I am new to C++. I was just going through some code and got this doubt.
The code had some CStringList defined somewhere. I wanted to print that to a file. So I wrote the below code
CStringList *stringListDev;
.....
.....
.....
.....
ofstream myfile("example.txt");
for(int i=0; i<stringListDev->Count; i++)
{
myfile << stringListDev[i];
}
I was getting an error saying << not defined on list or something. Please guide me how to write contents of a stringlist to a file in C++.