Page 1 of 1

Programming help?

Posted: Wed Dec 02, 2015 6:57 pm
by Zedability
Any programming people here? I need to print out relations in a specific way. So say I have:

A B B C A A
-----------------------------
'1' '4' '4' '7' '1' '1'
'9' '3' '3' '5' '9' '9'

(sorry I can't figure out how to make it line up in this thing)

I need to develop an algorithm that would print:
A='1', B='4', C='7'
A='9', B='3', C='5'

without repeating the extra B's and A's

The problem is that the top row (the scheme) is stored in one vector of strings (myscheme), and the bottom rows (the tuples) are each their own separate vectors of strings, which are stored in a set (mytuples). So it's more complicated than just using the unique() std function or something.

And yes it has to be stored and printed that way.

Normally I don't ask for hw help on here, but one of my TA's quit and there's basically no TA hours to get help with these things.

Re: Programming help?

Posted: Wed Dec 02, 2015 7:07 pm
by Cognoscente
Just guessing.... C++?

Also, use the

Code: Select all

 tag.

Re: Programming help?

Posted: Wed Dec 02, 2015 7:10 pm
by Cognoscente
Also, if you haven't used Stack Overflow yet, now's a great time to start. Every single professional dev I've worked with uses it on a regular basis. One of the most active and helpful resources for code questions anywhere.

Re: Programming help?

Posted: Wed Dec 02, 2015 7:24 pm
by Zedability
Sounds good.

Also, I figured it out. Because apparently all it takes is for me to actually ask for help and then my brain is like, "hold up, this is how!"

Re: Programming help?

Posted: Wed Dec 02, 2015 8:19 pm
by Amity
Ha, my brain does that all the time too.