Home > Back-end >  Solve the error pointer to function to get my head is swimming
Solve the error pointer to function to get my head is swimming

Time:11-07

#include
# define N 5
#include
Typedef struct
{
Int the date [];
Int length;
} Seqlist;

////////////////////////////////////////////////////////////////////////
Void the ex (int seq - & gt; The date)
{
Int I, j, temp.
For (I=0, j=4; i<2; I++, j -)
{
* seq - & gt; The date [I]=temp;
* seq - & gt; The date [j]=seq - & gt; The date [I];
* seq - & gt; The date [I]=temp;
}
Printf (" * * * * * * * * * * * * * * * * after reverse * * * * * * * * * * * \ n ");
for(i=0; i{
Printf (" % d ", seq - & gt; The date [I]);
}
return;
}
////////////////////////////////////
Int main ()
{

Seqlist * seq=(Seqlist *) malloc (sizeof (Seqlist));
Seq - & gt; Length=10;
Seq - & gt; The date of [0]=3;
Seq - & gt; The date [1]=7;
Seq - & gt; The date of [2]=2;
Seq - & gt; The date of [3]=10;
Seq - & gt; The date of [4]=1;
int i;
Printf (" * * * * * * * * * * * * before the reverse: * * * * * * * * * * * * * * ");
printf("\n");
for(i=0; i{
Printf (" % d ", seq - & gt; The date [I]);
}
The ex (seq - & gt; The date);
return 0;
}

CodePudding user response:

Error display
  • Related