If you use std::string then you can - because it has lots of different operators defined.
If using C, then functions like wcsncmp et al. might be the go. Note the use of the more secure version of the function with the n in them, they do bounds checking
C++.
I would use std::wstring but I can't because I doesn't let me to write to files with it, like this:
1 2 3
ofstream file("file.txt");
wstring text = "sadsd";
file << text << endl;
So Im going to use stdio.h functions, but Im wondering if it doesn't take more memory? It marks << red in Visual Studio and says "Error: no operator matches these operands".
Damn, I suspected, but didn't know there were unicode streams. That's what I needed. Thanks, but there is more. I already moved on to TCHAR arrays and it became handy. kemort, so you're saying I can't use if (TCHAR[] != TCHAR[]) but strcmp (or whatever unicode's version is out there) instead?
AFAIK strcmp() is the way unless you want to write it yourself array element by element because that's all strcmp() does. I'm just taking your post on face value where you have a char array. All the rest being posted beyond that is outside anything I want to add to.
You can try it your way if you like, but it doesn't work "Warning: array comparison always evaluates to false".
TCHAR can probably can be used with strcmp(), it's just a Microsoft thing (to corner the market :) ) - but it's the same as char IIRC.