Okey this is driving me crazy now...
I'm working on a directX game in c++ and I got a global wchar variable called FpsString witch i declared like this:
WCHAR * FpsString;
And in my initialization code i initialized it like this:
WCHAR a[100];
FpsString = a;
Okay, here is the prob... FpsString suddenly changes to some Japanese (no offense) letters every time I enter the Rende开发者_开发百科r loop
Did I declare it wrong or what?
Is WCHAR a[100];
also global (static) or is it perhaps a local variable?
If it's local then that's your problem: It stops to exist when the scope (function) is complete.
Change it to FpsString = new WCHAR[100];
精彩评论