B
bmwrob
I’m very new in C++ programming and am trying to make a decoder tool
just for the purpose of learning. I started my project in VC++ 6.0,
but after a change of PC, I continued my programming in VS .NET.
Now I get a lot of compiling error which I don’t understand. Here is
an extract from the code:
int iOct;
CString sASCII;
sASCII += ((iOct >> 4) + 48);
This works fine in VS 6.0 but gives an error stating it’s “ambiguous”
in .NET!
I do have this workaround :
char cTemp[8];
iOct = ((iOct >> 4) +48);
itoa(iOct,cTemp,16);
sASCII += cTemp;
But it would be nice if the simple VS 6.0 version of the code worked.
Any idea why .NET dislike the original code and if it’s possible to
fix?
BR /// Rob
just for the purpose of learning. I started my project in VC++ 6.0,
but after a change of PC, I continued my programming in VS .NET.
Now I get a lot of compiling error which I don’t understand. Here is
an extract from the code:
int iOct;
CString sASCII;
sASCII += ((iOct >> 4) + 48);
This works fine in VS 6.0 but gives an error stating it’s “ambiguous”
in .NET!
I do have this workaround :
char cTemp[8];
iOct = ((iOct >> 4) +48);
itoa(iOct,cTemp,16);
sASCII += cTemp;
But it would be nice if the simple VS 6.0 version of the code worked.
Any idea why .NET dislike the original code and if it’s possible to
fix?
BR /// Rob