Hello,
I have a file which I need to read which contains some unusual characters (EG: '╠') and I need to be able to read it and convert those characters to numbers. As an example of what I am looking for would be code that reads a file and prints "Found" whenever '╠' is encountered. How do I do this with native std::fstream compatibility?
EG:
void testFile(const char *str)
{
std::fstream file(str);
char temp;
int count=0;
while (!file.eof())
{
file>>temp;
if (temp=='╠')//I highly doubt this would work
count++;
}
cout<<"Found "<<count<<" ╠s"<<endl;
}
I am sure that there is a way to store unicode characters into a char, and I seem to recall its 'u####' or something like that, and I think I need a different type for my char, but for the life of me I can't seem to remember what it is called. On top of that I am unsure how reading those larger chars from std::fstream objects works.