Code: Select all
file = fopen( "file.txt", "rb" )
temp_string = new( 1024, 1, INT8 )
length = 0
while 1 {
length = fgets( temp_string, 1024, file )
if ( length == -1 ) { break }
}
remove( temp_string )
fclose( file )
now, i want to get the first character from the acquired string. but, i can't figure out how to do this. this is what i'm doing now:
Code: Select all
temp_string[ 0 ]
how can i get the first character? is there a better way than using an INT8 container?
thanks