I'm using (or rather, trying to use) std::ifstream for some file input. I'm getting this compile-time error, which has me stumped:
Error 1 error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' c:\program files\microsoft visual studio 8\vc\include\fstream 933
Here is the code which interacts with it, as well as the declaration:
std::ifstream file;
file.open(loader.str().c_str(), std::ios_base::in);
if(!(file.good()))
return false;
file.get(CurrentChars.front());
do {
if(CurrentChars.front() == '<')
{
METADATA = true;
}
else if (CurrentChars.front() == '{')
{
Char_iterator = CurrentChars.begin();
do {
file.get(*(Char_iterator));
Char_iterator++;
} while (CurrentChars.back() != '}');
}
if (METADATA)
if(!(ProcessMetaData (file, CurrentChars)))
return false;
else
if(!(ProcessData (file, CurrentChars)))
return false;
file.get(CurrentChars.front());
} while (CurrentChars.front() != '#');
METADATA is a bool, char_iterator is a std::vector<char>::iterator, and CurrentChars is a std::vector<char>.
Any help will be appreciated. I'll keep trying to find it on my own, but it's kinda wierd... anyway, thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.