Help!

Started by
3 comments, last by mad_hatter 22 years, 2 months ago
Okay,there is something wrong with the following code but i dont know what,can some one help? if ( mychar ==''middlemiddle'') thanks.
Advertisement
Err.. you can only have a single character in between ' '


Edited by - Fruny on February 1, 2002 6:16:26 PM
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Like this?
if ( mychar ==''m''''i''''d''''d''''l''''e''''m''''i''''d''''d''''l''''e'''')

(those arnt " they just look like it )
Try this:

if ( mychar =="middlemiddle")

quote:Original post by Ulbian
Try this:

if ( mychar =="middlemiddle")



What language is this? Whichever it is, I think you should use the built-in String compare functions (look in the String class in Java, check out the strcmp() function in C).

This topic is closed to new replies.

Advertisement