Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C++ string.compare???

Name: Anonymous 2009-09-21 5:37

i do not for the life of me understand how this string variable works in c++.

i'd rather do this using a regular char array and strcmp functions but i'm trying to help a friend with his c++ home work and i cannot get this to work. i don't usually code c++ but i didn't think it would be that much different from c...

http://www.pastie.org/624362

biggest issues are using .compare with the string because i know i can store the entered string like this.

also if i uncomment the goto line it will get stuck in an endless loop if i enter any dots and lines, which is very weird. entering abc doesn't do it but entering morse code with dots, lines and white spaces causes the program to just go around and round displaying all the menus but automatically entering the dots and looping away. what's wrong with dots?

Name: Anonymous 2009-09-21 5:49

SEPPLES

Name: Anonymous 2009-09-21 6:06

>>1
What!

Name: Anonymous 2009-09-21 6:29

saw a white guy with a nigger chick in the streets today. no big deal you say? i'm in friqqen eastern europe

Name: Anonymous 2009-09-21 6:39

You're asking /prog/ for advice?

HAHAHAHA

Name: Anonymous 2009-09-21 6:41

>>4
She was probably picking up her Russian mail-order husband. Chicks love seeing their home town, meeting their family, etc. before they leave. Defeats the whole purpose of mail-ordering if you ask me.

Name: Anonymous 2009-09-21 6:57

>>4
Now that you brought it up, I don't remember seeing black women here. Black man I see all the time, but no black women. Huh.

Name: Anonymous 2009-09-21 7:09

Name: 2009-09-21 7:09

Name: Anonymous 2009-09-21 7:14

if(str1.equals(str2)){
   System.out.println("JAVA WAS HERE, SEPPLES IS NOT ENTERPRISE ENOUGH");
}

Name: Anonymous 2009-09-21 8:42

You can just compare c++ strings using "==".

Name: Anonymous 2009-09-21 9:37

>>1
i don't usually code c++ but i didn't think it would be that much different from c
The good parts of C++ aren't much different from C.

Name: Anonymous 2009-09-21 11:11

The good parts of C++
ihbt :(

Name: Anonymous 2010-12-25 19:43


Don't change these.
Name: Email:
Entire Thread Thread List