×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2007
    Posts
    27

    Need some help with my code

    Hello all

    Just wondering if I have done something wrong here...Here is my code

    Code:
    console->Printf(KTestText);
     		
     		TChar text;
    	
    		while (text != EKeyEnter)
    		{
    		text = aConsole->Getch();	
    		aConsole->Printf(_L("%c"), text);
    		Players.Append(text);		
    		}
    		
    		if (Players == KTestText)
    		{
    			console->Write(_L("\nWell Done"));
    		}
    		
    		else 
    		{
    			console->Write(_L("\nYou Suck"));
    		}
    Basically it just past the if statment and goes straight to the else statement...Anyone could help out?....Do you need the whole code?

    Thank you

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Smile Re: Need some help with my code

    Hi,

    Are you sure that you are getting correct values in "Player" before you are comparing?

    Also refer to the following link: Look forward for "Match", "Compare".
    Using TDesC16 Class

    Kiran.

Similar Threads

  1. Replies: 2
    Last Post: 2007-10-05, 20:40
  2. Link errors when trying to Display bitmap
    By Bkc82 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-01-16, 22:46
  3. How to handle a response with HTTP status code 100 (Continue)?
    By danieldkim in forum Mobile Java General
    Replies: 5
    Last Post: 2004-01-19, 10:54
  4. Replies: 0
    Last Post: 2003-09-26, 15:07

Posting Permissions

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