• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

CAr '>>' error

Status
Not open for further replies.
Junior Spellweaver
Joined
Nov 9, 2010
Messages
114
Reaction score
2
I've recently have had to re-install windows and set everything up again, the source, etc.
And since then I get these errors:

Code:
DPClient.cpp(9182): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
DPClient.cpp(9189): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
DPClient.cpp(9209): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
DPClient.cpp(9216): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
DPClient.cpp(9297): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
DPClient.cpp(9361): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
DPClient.cpp(9416): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
DPClient.cpp(9440): error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'CAr' (or there is no acceptable conversion)
And these are things like...


Code:
ar >> GC_IN_WINDOW;

Code:
ar >> GC_IN_APP;

Code:
ar >> (BOOL)TRUE;		// bWindow

Code:
ar >> pTrader->GetId();

It seems like it happens only when its trying to pass something that is not common/pre-defined or something...

Any help pls?
 
Elite Diviner
Joined
Mar 12, 2009
Messages
487
Reaction score
67
It's pretty hard to tell what goes wrong with so less information provided by you. Perhaps you can tell us the add in you want to place so we can check it for ourselfs?

Edit, i would recommend using a clean dp-client.cpp from the clean source and compare it with the one you have. Also verify dpclient.h. It's most probably a problem with a broken else/or, or you have invalid ifdef's.
 
Skilled Illusionist
Joined
Feb 3, 2007
Messages
321
Reaction score
67
The >> operator copies the memory from the ar to whatever is on the right side of the operator.
You're trying to copy memory to nonvariables or constants.

The correct way to use the >> operator is by copying memory to a variable:
int nTraderId = 0;
ar >> nTraderId;

Although the << operator, can copy from just about anything because it doesn't write to a variables location:
ar << (BOOL)TRUE;
In the above case, technically BOOL doesn't necessarily have to be written before TRUE, because BOOL is essentially int, and TRUE is also int, so ar << TRUE; is fine.
 
Status
Not open for further replies.
Back
Top