Home > Back-end >  C language compiler error: expected ') 'before' * 'token [
C language compiler error: expected ') 'before' * 'token [

Time:09-26

Void the add (tel * h)
{
P1 p0, tel * * * (p2);
P1=h - & gt; next;
P0=new tel;
Cout<" Input to insert node name and phone number: ";
Cin> P0 - & gt; Name> P0 - & gt; No;
If (h - & gt; Next==NULL);
(h - & gt; Next=p0; P0 - & gt; Next=NULL);
The else
{
While ((STRCMP (p0 - & gt; The name, p1 - & gt; Name) & gt; 0) & amp; & (p1 - & gt; Name))
{
P1 p2=;
P1=p1 - & gt; next;
}
If (STRCMP (p0 - & gt; The name, p1 - & gt; Name) & lt;=0)
{if (h - & gt; Next==(p1)
H - & gt; Next=p0;
The else
The p2 - & gt; Next=p0;
P0 - & gt; Next=p;
}
The else {p1 - & gt; Next=p0; P0 - & gt; next=NULL; }
}
Cout<" Add success!" }
Could you tell me what is the format of the mistake

CodePudding user response:

Won't be operations.

If (h - & gt; Next==NULL);//remove the semicolon
(h - & gt; Next=p0; P0 - & gt; Next=NULL);//change the brackets to {}

CodePudding user response:

Is the homework this too...

CodePudding user response:

Program or there is an error
  • Related