Hi.
Im updateing my system and I thought why I'm at it I should get VC10 I only have vista.
Now I can build the app and it all works but when I run it I get this here does anybody know what to do here.
Hi.
Im updateing my system and I thought why I'm at it I should get VC10 I only have vista.
Now I can build the app and it all works but when I run it I get this here does anybody know what to do here.
Hello, Thanks for the link(the first articles link is broken).
So vc10 port found a error. How the Hell did this bit of code run in vc8.
Heres the code what was I thinking here
//we can get the string based on the textbyte size
std::string labeltext;
labeltext.resize(DlgObj_Labeltemp.TextByteSize +1);//the + 1 is so we can add a null THIS HERE ??????????????
for(DWORD textsize = 0; textsize < DlgObj_Labeltemp.TextByteSize; textsize++)
{
run = FileAccess.ReadData(sizeof(char),// inbytes to read
&labeltext[textsize]);//will hold the data read from file
if(run == false)
{
break;
}//end error
}//end getting text
ValidLabel = true;
//add a null
//labeltext[DlgObj_Labeltemp.TextByteSize + 1] = '\0'; AND THIS HERE LOL ????????????????????
This code is out of my dialog box file loader. It loads the text for the label. How erver this run on vc8 Any Ideas.
Other then that the port was smoother then I thought it would be. Now I have another 4 apps to port fun fun fun.
Expect even more fun if you use custom allocators with STL, the allocator interface for STL changed with VC10.
And now also get rid of that "+1" and any attempt to add useless null-bytes to a std::string.
Plus, what is the semantics of that ReadData function? One would expect the function to take the number of bytes you want to read and return the number of bytes it actually did read (not a generic bool indicating plain success). Since pretty much the only constant is that char is one byte (with no promises as to how many bits in one byte), the whole loop looks like a really convoluted way to say:
FileAccess.ReadData(labeltext.size(), &labeltext[0]);