I have a big problem with string things
Firstly, I am not able to load a few pics to an array because this thing:
Code: Select all
array[i].SetSurface( std::wstring(L"Sprites\\temple\\t%d.bmp",i),D3DCOLOR_XRGB(255, 0, 255));
Secondly, could anybody tell me something about strings in c++. I am absolutely lost.
In c# I used only string s = "sth"; and that was all everything was string. (Perfect method ToString() made everything easier). And now. Somethimes I saw char something[]. Thats ok. Just an array of characters. But the work with it is horrible for me. In Jesse Liberty's book anout c++ is written that printf is horible thing. Better use cout<<.
Chili use a my nightmare above. I am not able to load a single sprite using wstring with parameters like %d,%char and put variable i after them.
Everything is in the code.
If you suggest better way. Ok but I want to know why it does not work and if is there some magic quide or somtehing about this problem then send me a reference.
Thanks a lot