How to pass an array as a parameter to another function?
Posted on 2004-11-30
I have this function that reads one line from a text file. The file is a list of tokens from a previous scanner program. I need to classified the tokens into their catergories. I can't figure out how to use the result from this function and pass it to the other function that compares the tokens and classifies them into their category. Can anyone help me out.
int SIZE = 40;
char line[ SIZE ];
if(( tokfile = fopen( "tokens.txt", "r" )) != NULL )
if( fgets( line, 40, tokfile ) == NULL )
printf( "fgets error\n" );
printf( "%s", line );
return line[ SIZE ];