-ken- helped me take the 11 errors to 4 by adding std:: before everything, but since this is my first time using ifstream (ya haha laugh it up), these last four got me stuck. All of them are from this class:
Code:
void Open_Check_Resp::load_file()
{
std::ifstream infile;
char test;
infile.open("C:\\checkresp.txt");
infile >> test;
infile.close();
std::cout << test;
}
the errors are:
Code:
--------------------Configuration: ChatBot - Win32 Debug--------------------
Compiling...
ChatBot.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\ChatBot\ChatBot.cpp(84) : error C2079: 'infile' uses undefined class 'basic_ifstream<char,struct std::char_traits<char> >'
C:\Program Files\Microsoft Visual Studio\MyProjects\ChatBot\ChatBot.cpp(88) : error C2228: left of '.open' must have class/struct/union type
C:\Program Files\Microsoft Visual Studio\MyProjects\ChatBot\ChatBot.cpp(90) : warning C4552: '>>' : operator has no effect; expected operator with side-effect
C:\Program Files\Microsoft Visual Studio\MyProjects\ChatBot\ChatBot.cpp(92) : error C2228: left of '.close' must have class/struct/union type
Error executing cl.exe.
ChatBot.obj - 3 error(s), 1 warning(s)
and heres the includes list:
Code:
#include <iostream>
#include <string>
#include <ctype.h>
#include <time.h>
#include <fstream.h>
using namespace std;