tags:

views:

57

answers:

1

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 Render loop

Did I declare it wrong or what?

+2  A: 

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];

Henk Holterman
It worked!!!Thank you very much! :D
Jeremi Stadler