Why don't you cout reg_confirm in your else statement to see why reg_confirm doesn't match or null?
Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239
>>char reg_confirm[256];
>>reg_confirm = (char*) malloc (sizeof(char)*llSize);
Its not possible to call malloc to allocate memory for reg_confirm since reg_confirm is not a pointer. Your compiler should have produced either an error or a warning about that.
>>if (reg_confirm == NULL)
reg_confirm will never ever be NULL because it is not a pointer.
>>if (reg_confirm == "0")
You can't compare two character arrays like that. You have to call strcmp(), like this: if( strcmp(reg_confirm,"0") == 0)
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343