This is the continuation of my previous question, In C++, how to read the contents of a text file, and put it in another text file?
After reading the contents of the file, and storing it in a vector, i want to compare the contents of the file with some integer like 0,
assume that the contents of my input.txt file are 0100.. So, after opening the second file, this is what i have given,
string a = inputLines[0] ;
cout << a[0] << '\n';
if (a[0] == "0")
{
cout << "Match" << '\n';
}
but, i am getting the error as pointer to integer comparison, how to avoid this error ?