Original Post
Ok I''m converting an old C program and decided to change a const data table into an XML file. I can open and close everything fine, it has nothing to do with the file part as you''ll see.
The following is giving me issues...
Here is a function that I am using. Notice the line "int vTemp;" is commented out.
void fCreateSkillFile()
{
FILE *fp;
fp = fopen( "skillfile.xml", "w");
fprintf(fp, "<SkillList>\n\r");
/* int vTemp;
for(int vTemp = 0; vTemp < MAX_SKILL;vTemp++)
{
fprintf(fp,"<Skill>\n\r");
fprintf(fp,"<SkillName>%s</SkillName>", skill_table[vTemp].name);
fprintf(fp,"</Skill>\n\r");
};
*/
fprintf(fp, "</SkillList>");
}
The above compiles FINE. No problems at all.
If I uncomment the line "int vTemp;" by moving the /* down one line. It won''t compile saying "missing ";" before ''type''"
Still looking and trying but figure out whats wrong (that function is the only thing added to the code that already works on its own). But quite honestly I can''t think of what on earth its trying to tell me.