need help..



<code>
line = 1;
while( !feof( infile ) )
{
if( line = 2 )
{
fgets( name, 25, infile );
}
else if( line = 3 )
{
fgets( address, 80, infile );
strcat( tempaddress, address );
if( strcmp( address, "?" ) == 0 )
{
line = 4;
}
}
else if( line = 4 )
{
fgets( yearofbirth, 5, infile );
}
else if( line = 5 )
{
fgets( telno, 15, infile );
}

line++;
printf( "%s%s%s%s", name, address, yearofbirth, telno );
addRecord( rptrp , name, address, atoi(yearofbirth), telno
);

}
</code>

I wonder if someone can help me out. For some reason, this while loop
doesn't update. line is always set to 1. i'm trying to get each line
and store it in each array.
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
.



Relevant Pages

  • Re: Isolate a region
    ... No good reason. ... Your loop is better. ... but I did it because the OP asked to avoid hardcoding. ... Prev by Date: ...
    (microsoft.public.excel)
  • How do I loop through table columns without using column names?
    ... I want to read a row, loop through those columns, read the next row, etc. ... The reason I need to do this is that each day I will import a new version of ... of columns (aye, there's the rub!) ... Prev by Date: ...
    (microsoft.public.access.modulesdaovba)
  • Do...Loop not working
    ... but for some reason (which I know ... Inside the loop are just if...then conditionals. ... I get an error stating that there is a loop without a do. ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • Sort order of folders collection
    ... I use the loop below to get a list of folders in "path": ... For some reason on WinXP the folders collection is appearantly sorted by ... Prev by Date: ...
    (microsoft.public.scripting.wsh)
  • Re: object system...
    ... but you shall not reason contradictory. ... while Halt loop ... Any finite halting problem is decidable, ...
    (comp.object)