>Can't I use "strcmp" like this?
Not if Training[0][0] is a character. strcmp compares strings, and a character is not a string. Use == instead:
if ( Training[0][0] == '1' )
Alternatively you could use strncmp to compare a subset of the string, then use the address-of operator on the indexed array:
if ( strncmp ( &Training[0][0], "1", 1 ) == 0 )
But that's kind of stupid unless the string subset is either variable or large enough for a direct comparison to be impractical.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004