Click here to Skip to main content
15,883,917 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
    MyLong n;
    d.setVector(this->vector);

    MyLong& e = *d;

MyLong operator*(MyLong&, MyLong&)
 MyLong operator*(MyLong &l1, MyLong &l2)
          ^



Ok, I am not sure what I am doing wrong, but I've been pulling my hair for 10 minutes.
Posted
Comments
Sergey Alexandrovich Kryukov 4-Mar-14 22:17pm    
It cannot be the real C++ code you would write. Tell us the truth: these lines are unrelated fragments of code, right? It is not correct or incorrect code; this is not C++ code at all.
Please provide some integral self-consistent sample of C++ compilation unit. Please see: SSCCE.
In other words: close the troll gate.
—SA
[no name] 4-Mar-14 22:17pm    
How about explaining the problem clearly and logically.
Sergey Alexandrovich Kryukov 4-Mar-14 22:18pm    
Trolls are infiltrating through the gate; please see above... :-)
—SA
[no name] 4-Mar-14 22:40pm    
Indeed.
OpenTheTrollGate 4-Mar-14 22:23pm    
Sorry, I just found what the problem was. You have to initialize the pointer MyLong* pointer = &d. and then use d the way you like.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900