S
sieg1974
Hi,
how can I compare one character of a string to a char?
I have tried this to compare the first character of directory to '/',
but when I run this program I got a segmentation fault.
void makeBaseDir( char * directory )
{
if( *directory[ 0 ] == '/' )
printf( "YES\n" );
}
Thanks,
Andre
how can I compare one character of a string to a char?
I have tried this to compare the first character of directory to '/',
but when I run this program I got a segmentation fault.
void makeBaseDir( char * directory )
{
if( *directory[ 0 ] == '/' )
printf( "YES\n" );
}
Thanks,
Andre