**FIXED**
Im trying to pass this istream to my class and into a function, but doesnt work. I get this error.
error:
'void PCall::get(std::istream &)' : overloaded member function not found in 'PCall'
Im just eather tired of missing something small. Anyone wanna point me in the right direction?
PCall class in pcall.h
Code:
#include <iostream.h>
class PCall
{
public:
void get(istream& in);
};
pcall.cpp
Code:
#include "pcall.h"
#include <iostream.h>
#include <string>
using std::istream;
using std::ifstream;
using namespace std;
void PCall::get(istream& in)
{
string currentCall;
in >> currentCall;
cout << currentCall << endl;
}
main.cpp
Code:
#include "pcall.h"
#include <iostream.h>
#include <fstream>
#include <string>
using std::istream;
using std::ifstream;
int main()
{
PCall newCall;
char fileName[16];
cout << "Enter the input file name: ";
cin.getline ( fileName,16, '\n' );
ifstream inFile;
inFile.open(fileName);
newCall.get(inFile);
return EXIT_SUCCESS;
}