Home > Back-end >  Help] [C source program simple parser: statistical annotation part number
Help] [C source program simple parser: statistical annotation part number

Time:10-09

Some of the requirements for screening the annotation of the target file number (I have put the target file data saved to a two-dimensional array), the comments here are divided into "//" class, and "/* */" class, this part of the code I had sent the below, but no, I have repeatedly check a few times did not check out where is wrong, could a great god, please help me have a look at where there are problems!! Save the children

for(i=0; i{
Len1=strlen (fileline [I]);
If (fileline [I] [0]=='/' & amp; & Fileline [I] [1]=='/')
{
The annotation +=1;
i++;
continue;
}
If (fileline [I] [0]=='/' & amp; & Fileline [I] [1]=='*')
{
If (fileline [I] [len1-2]=='*' & amp; & Fileline [I] [len1-1]=='/')
{
The annotation +=1;
i++;
continue;
}
The else
{
flag=1;
The annotation +=1;
i++;
continue;
}
}
If (fileline [I] [len1-2]=='*' & amp; & Fileline [I] [len1-1]=='/')
{
If (flag)
{
flag=0;
The annotation +=1;
i++;
continue;
}
The else
{
i++;
continue;
}
}
If (flag)
{
The annotation +=1;
i++;
continue;
}
}
  • Related