Results 1 to 2 of 2

Thread: char comparaison problem

  1. #1

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362

    char comparaison problem

    Code:
    char c = txt.at(0);
    		if (c == '  ')
    			bG = true;
    		else if(c == '13')
    			bG = true;
    		else if(c == '10') 
    			bG = true;//SHOULD go here :(
    		else if(c == ';')
    			bG = true;
    		else
    			bG = false;
    The problem is in debug that caracter in c = 10 and bG doesn't go to true but will go to the else and will be false...why?

  2. #2

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Ok i knew that was easy to solve I had put '10' when it's only 10...no need ' '

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width