Hello, i'm sorry for posting such question but, i can't resolve this by myself

.
Code:
using namespace std;
typedef map < const char*, const char* > Tuple;
typedef vector < Tuple > QueryResult;
typedef map < const char*, QueryResult::iterator > Entry;
QueryResult ParseQuery ( PGresult *result ) {
QueryResult Query;
Tuple mapping;
char fieldName[50];
char fieldResult[50];
for ( int nTuples = 0; nTuples != PQntuples ( result ); ++nTuples ) {
for ( int nFields = 0; nFields != PQnfields ( result ); ++nFields ) {
strcpy_s ( fieldName, PQfname ( result, nFields ) );
strcpy_s ( fieldResult, PQgetvalue ( result, nTuples, nFields ) );
mapping [ fieldName ] = fieldResult;
printf ( "this field is ?%s.\n", fieldName );
if ( fieldName == "userid" )
printf ( "BLA!\n" );
else
printf ( " Not Yet . \n" );
}
Query.push_back ( mapping );
mapping.clear ( );
}
return Query;
}
the problem is: when it come to: if ( fieldName == "userid" ). It will always return false, but i have the field "userid" in my table, and i know its exist, the line: printf ( "this field is ?%s.\n", fieldName ); show it.
Again, i'm sorry for posting question here, but the reason remain obscure, and it drives me crazy xD.