Search Forums

anyone know c++?
tracyg Posted: Sep 24, 2003 10:13 AM+
tracyg MEMBER SINCE: 1/03 TOTAL POSTS : 5129 WEDDING DATE: May 09, 2004
Posted: Sep 24, 2003 10:13 AM bride-minus.png

anyone know c++?

i need homework help!
Reply   |   Quote    |   Subscribe   |   Report
smooch Posted: Sep 24, 2003 10:29 AM+
smooch MEMBER SINCE: 4/03 TOTAL POSTS : 1541 WEDDING DATE: Aug 01, 2003
Posted: Sep 24, 2003 10:29 AM bride-minus.png

Re: anyone know c++?

you mean C+, the programming language? yes, i know C+. what's up?
Reply   |   Quote    |   Subscribe   |   Report
tracyg Posted: Sep 24, 2003 10:36 AM+
tracyg MEMBER SINCE: 1/03 TOTAL POSTS : 5129 WEDDING DATE: May 09, 2004
Posted: Sep 24, 2003 10:36 AM bride-minus.png

Re: anyone know c++?

no, it's c++ we're doing.

how do you compare 3 strings? i could do 2, but not 3. (in lexicographical order)
Reply   |   Quote    |   Subscribe   |   Report
NovemberSue Posted: Sep 24, 2003 10:47 AM+
NovemberSue MEMBER SINCE: 5/02 TOTAL POSTS : 9878 WEDDING DATE: Nov 08, 2002
Posted: Sep 24, 2003 10:47 AM bride-minus.png

Re: anyone know c++?

What subject is that?
Reply   |   Quote    |   Subscribe   |   Report
tracyg Posted: Sep 24, 2003 10:48 AM+
tracyg MEMBER SINCE: 1/03 TOTAL POSTS : 5129 WEDDING DATE: May 09, 2004
Posted: Sep 24, 2003 10:48 AM bride-minus.png

Re: anyone know c++?

computer science (algorithmic problem solving)
Reply   |   Quote    |   Subscribe   |   Report
NovemberSue Posted: Sep 24, 2003 10:50 AM+
NovemberSue MEMBER SINCE: 5/02 TOTAL POSTS : 9878 WEDDING DATE: Nov 08, 2002
Posted: Sep 24, 2003 10:50 AM bride-minus.png

Re: anyone know c++?

Oh! Science was never one of my favorites.
Reply   |   Quote    |   Subscribe   |   Report
smooch Posted: Sep 24, 2003 10:54 AM+
smooch MEMBER SINCE: 4/03 TOTAL POSTS : 1541 WEDDING DATE: Aug 01, 2003
Posted: Sep 24, 2003 10:54 AM bride-minus.png

Re: anyone know c++?

do you need to compare all 3 at once? can you compare a,b then b,c then a,c?
Reply   |   Quote    |   Subscribe   |   Report
tracyg Posted: Sep 24, 2003 11:00 AM+
tracyg MEMBER SINCE: 1/03 TOTAL POSTS : 5129 WEDDING DATE: May 09, 2004
Posted: Sep 24, 2003 11:00 AM bride-minus.png

Re: anyone know c++?

i tried doing all three at once but it didn't work. I think i have to compare 2 at a time, but it has to output them in order. and thats whats stumping me. I guess i compare 2 at a time and assign them values like 'first', 'second' and so on? grrrrr my head hurts. im tired of thinking!
Reply   |   Quote    |   Subscribe   |   Report
smooch Posted: Sep 24, 2003 11:02 AM+
smooch MEMBER SINCE: 4/03 TOTAL POSTS : 1541 WEDDING DATE: Aug 01, 2003
Posted: Sep 24, 2003 11:02 AM bride-minus.png

Re: anyone know c++?

are the strings in variables? how are you outputting them? are they in an array? or just outputting to the screen? are you comparing so you can sort alphabetically?
Reply   |   Quote    |   Subscribe   |   Report
tracyg Posted: Sep 24, 2003 11:05 AM+
tracyg MEMBER SINCE: 1/03 TOTAL POSTS : 5129 WEDDING DATE: May 09, 2004
Posted: Sep 24, 2003 11:05 AM bride-minus.png

Re: anyone know c++?

yeah, comparing so we can sort it alphabetically. then output all three words in order

variables are-
string word1;
string word2;
string word3;
Reply   |   Quote    |   Subscribe   |   Report
smooch Posted: Sep 24, 2003 11:21 AM+
smooch MEMBER SINCE: 4/03 TOTAL POSTS : 1541 WEDDING DATE: Aug 01, 2003
Posted: Sep 24, 2003 11:21 AM bride-minus.png

Re: anyone know c++?

do you use arrays yet? if so, i'd compare word1, word2. put the 'first' one in array position 0, put the 'second' in array position 1. then compare word3 with the one in the first position. if it's greater than, shift the array down 1, putting word3 in the 0th position. if it's less then, then you must compare with position 1, shift down if greater than. if less than, put in array position 2.

if you are not using arrays, i'd create 3 variables: first, second, third as strings.
compare word1, word2.
if word1 > word2 then
first = word1
second = word2
else
first = word2
second = word1

...
now compare word3, putting it in the right position and moving first and second appropriately. does this help?
Reply   |   Quote    |   Subscribe   |   Report
tracyg Posted: Sep 24, 2003 12:27 PM+
tracyg MEMBER SINCE: 1/03 TOTAL POSTS : 5129 WEDDING DATE: May 09, 2004
Posted: Sep 24, 2003 12:27 PM bride-minus.png

Re: anyone know c++?

it helps a little. thanks
I have the comparing of the first two... but then once i introduce the third number it messes things up. f it, i'll just hand it in incomplete... nothing is working.
Reply   |   Quote    |   Subscribe   |   Report
smooch Posted: Sep 24, 2003 02:14 PM+
smooch MEMBER SINCE: 4/03 TOTAL POSTS : 1541 WEDDING DATE: Aug 01, 2003
Posted: Sep 24, 2003 02:14 PM bride-minus.png

Re: anyone know c++?

don't give up! give me your logic for the 3rd string. we can work through this!
Reply   |   Quote    |   Subscribe   |   Report
tracyg Posted: Sep 24, 2003 02:56 PM+
tracyg MEMBER SINCE: 1/03 TOTAL POSTS : 5129 WEDDING DATE: May 09, 2004
Posted: Sep 24, 2003 02:56 PM bride-minus.png

Re: anyone know c++?

i ended up doing it the long way. Setting it up for each instance. then i finally got it to work when i found i was missing curly brackets in places.

it bugs me i can't get it the (probably) more simpler way, but as long as i got it to work (since its due today) thats what counts.

Reply   |   Quote    |   Subscribe   |   Report
No Posts Found With Your Match.
  • Chat With Local Long Island Brides
  • Chat With Local Brides
  • Bridalexpo - Weekday
  • Table WeAr'-Table WeAr'
  • Ballroom Dance Long Island-Ballroom Dance Long Island
  • Appraiser - Jewelry-
 
Welcome New Vendors
X
X
X
X
Email to Friend
X
Submit a Report