user16703: void GravaFicheiros(CONFERENCIA *co)
{

    int i, ii, iii;

    FILE *fp;

    fp = fopen("grabameisso", "wt");

    fprintf (fp, "%s\n", co->nomeconf);

    int k = NSessoes(co);
    fprintf (fp, "%d\n", k);

    for (i = 0; i < k; i++)
    {

        fprintf (fp, "%s\n%d\n%d\n", co->sessoes[i].tema, co->sessoes[i].hora, co->sessoes[i].auditorio);

        int a = NArtigos(co, i);

        fprintf (fp, "%d\n", a);

        for (ii = 0; ii < a; ii++)
        {

            fprintf (fp, "%s\n", co->sessoes[i].artigos[ii].titulo);

            int aa = NAutores(co, i, ii);

            fprintf (fp, "%d\n", aa);

            for (iii = 0; iii < aa, iii++)
            {

                fprintf (fp, "%s\n%d\n", co->sessoes[i].artigos[ii].autores[iii].nome, co->sessoes[i].artigos[ii].autores[iii].idade);
            }
        }
    }

    fclose(fp);
    return;


user16705: Although you didn't ask a specific question I assume you want to know why there was an error in your code.
One of your for loops is missing a semi-colon.

for (iii = 0; iii < aa, iii++) //this line gives the error


Should be:
 for (iii = 0; iii < aa; iii++) //the comma should be a semi-colon

When it says ; expected before token ). It means quite literally that there is a ; missing before a ).

16703: <pre><code>void GravaFicheiros(CONFERENCIA *co)
{

    int i, ii, iii;

    FILE *fp;

    fp = fopen("grabameisso", "wt");

    fprintf (fp, "%s\n", co-&gt;nomeconf);

    int k = NSessoes(co);
    fprintf (fp, "%d\n", k);

    for (i = 0; i &lt; k; i++)
    {

        fprintf (fp, "%s\n%d\n%d\n", co-&gt;sessoes[i].tema, co-&gt;sessoes[i].hora, co-&gt;sessoes[i].auditorio);

        int a = NArtigos(co, i);

        fprintf (fp, "%d\n", a);

        for (ii = 0; ii &lt; a; ii++)
        {

            fprintf (fp, "%s\n", co-&gt;sessoes[i].artigos[ii].titulo);

            int aa = NAutores(co, i, ii);

            fprintf (fp, "%d\n", aa);

            for (iii = 0; iii &lt; aa, iii++)
            {

                fprintf (fp, "%s\n%d\n", co-&gt;sessoes[i].artigos[ii].autores[iii].nome, co-&gt;sessoes[i].artigos[ii].autores[iii].idade);
            }
        }
    }

    fclose(fp);
    return;
</code></pre>
 16705: <p>Although you didn't ask a specific question I assume you want to know why there was an error in your code.</p>

<p>One of your for loops is missing a semi-colon.</p>

<blockquote>
<pre><code>for (iii = 0; iii &lt; aa, iii++) //this line gives the error
</code></pre>
</blockquote>

<p>Should be:</p>

<pre><code> for (iii = 0; iii &lt; aa; iii++) //the comma should be a semi-colon
</code></pre>

<p>When it says ; expected before token ). It means quite literally that there is a ; missing before a ).</p>
