I am trying to have a function that when ever I call it it writes a certain set of text to the file. For some odd reason when ever I try to insert "](" string the file gets messed up.
This it the original code.
1 2 3 4 5
|
fRecord << '[' << LongToString(GetRValue(COLOR2))
<< ',' << LongToString(GetGValue(COLOR2))
<< ',' << LongToString(GetBValue(COLOR2))
<< "](" << LongToString(X)
<< ',' << LongToString(Y) << ')';
|
The LongToString function is just a function I made to change a long integer to a string object and the GetRValue and such just extracts a RGB color value from a COLORREF object.
It should turn out to [255,255,255](0,0)[255,255,0](100,100) in the file. However I end up with ㉛㔵㈬㔵㈬㔵⡝ⰰ⤰㉛㔵㈬㔵〬⡝〱ⰰ〱⤰.
when I delete one or both of the ]( charaters from the insert statment it works fine just with the missing charater.
For instance when I use this code.
1 2 3 4 5
|
fRecord << '[' << LongToString(GetRValue(COLOR2))
<< ',' << LongToString(GetGValue(COLOR2))
<< ',' << LongToString(GetBValue(COLOR2))
<< LongToString(X)
<< ',' << LongToString(Y) << ')';
|
I get [255,255,2550,0)[255,255,0100,100). It seams when I insert the charater combination of ]( it messes up. I have tried inserting them individualy and separating them in seperate sentences and I still does the same thing. Does anyone know what is going on.