Including iostream cleared two of those up, thanks!
Another place recommended I use a wifstream instead of ifstream, which I will probably do since I want to be able to read a Unicode file. However, even with wifstream, I'm still getting an error. Here's the new code and error:
typedef basic_string<TCHAR> tstring;...std::wifstream file(_T("Strings.txt")); if (file.is_open()) { tstring line = _T(""); std::getline(file, line); }
error C2664: 'std::basic_ifstream<_Elem,_Traits>::basic_ifstream(const char *,std::_Iosb<_Dummy>::openmode,int)' : cannot convert parameter 1 from 'const unsigned short [12]' to 'const char *' with [ _Elem=wchar_t, _Traits=std::char_traits<wchar_t>, _Dummy=int ]
Now, obviously it wants ANSI char's, but that seems silly given that it's designed to read Unicode. Does anyone have another way to do this?
(If this is beyond the scope of the For Beginners forum, sorry; if a mod so judges, would you kindly move it to General Programming?)