Template errored | Sololearn: Learn to code for FREE!

+1

Template errored

Can any one please help me to understand the error into the attached code? https://code.sololearn.com/coGe3BSoS5wz/?ref=app

5 Answers

New Answer

+2

~ swim ~ Not working. I got the solution and I have updated the code. Please check it. Let me know if you have better solution.

+3

π•Ώπ–π–Š π•²π–—π–Šπ–†π–™ π•Ύπ–†π–Œπ–† Line 119 pair<V, W> makepair <V t, W u> should be pair<V, W> makepair (V t, W u)

+2

π•Ώπ–π–Š π•²π–—π–Šπ–†π–™ π•Ύπ–†π–Œπ–† Your solution is better, i can't think of anything else of now. Will let you know if i figure out a solution.

+1

~ swim ~ I am trying to implement STD::get(pair) method. But unable get logical idea. I have updated my code into same file. Could you please check and help here. My goal is to compile and run last two line from the main. One them is commented at the moment.

+1

π•Ώπ–π–Š π•²π–—π–Šπ–†π–™ π•Ύπ–†π–Œπ–† I took a look even though I don't have much template programming experience. It appears your get<int> functions are written incorrectly. Try commenting out all the lines except for the first 3 in main and read the output. Also, here is my adjustment of the code with all but the 3 lines commented out. It seems to work like this: https://code.sololearn.com/cmvjmseLKO5r/?ref=app