Programming help?
Posted: Wed Dec 02, 2015 6:57 pm
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.
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.