My project has around 50 files, I already search all header files to check if any function pass fstream as argument, and modify them all to be passed as reference instead of as object.
I don't understand why if I use following code:
ifstream fin(OutputF, ios::in,ios::nocreate);
I got error like "C2039: 'nocreate' : is not...", but if I modify it to:
ifstream fin(OutputF, ios::in,ios::_Nocreate);
I got other kind of error messge:
"error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private.."
Wait, if you're doing an ifstream (input), why are you specifiying "no create" at all? That doesn't make sense, it's not going to get created if it can't find it. That's only even applicable at all if you're opening in read/write or write modes.