F
Falos425
Okay, I've got a driver.cpp, a section.cpp, and a section.h because
I've got a 'section' class.
I have an #include <fstream> in the section.h and then section.cpp has
an #include "section.h"
Trouble is, one of the class functions is supposed to (homework) take a
string as a parameter, and use it as the filename. So in the function,
I've got..
void Section::readData (char* fileName)
{
ifstream gradesFile(fileName);
....and get a compiler error. I'm fairly sure #include <fstream> is in
the proper place, so why do I keep getting
section.cpp: In member function `void Section::readData(char*)':
section.cpp:28: error: `ifstream' undeclared (first use this function)
I've got a 'section' class.
I have an #include <fstream> in the section.h and then section.cpp has
an #include "section.h"
Trouble is, one of the class functions is supposed to (homework) take a
string as a parameter, and use it as the filename. So in the function,
I've got..
void Section::readData (char* fileName)
{
ifstream gradesFile(fileName);
....and get a compiler error. I'm fairly sure #include <fstream> is in
the proper place, so why do I keep getting
section.cpp: In member function `void Section::readData(char*)':
section.cpp:28: error: `ifstream' undeclared (first use this function)