I have three of the same compiler errors for one class that I have developed and I am not sure why this occurs. Maybe it has something to do with the class definition. I am not sure. The following code is where the namespace errors occur.
Any ideas as to what might create the error.
Thanks,
Todd
Code:
#ifndef BRIDGE
#define BRIDGE
// bridge.h: interface for the Bridge class.
#include <fstream>
#include <iostream>
using namespace std;
class Bridge
{
private:
ifstream theCardFile;
public:
Bridge(void); //constructor
~Bridge(void); //destructor
void Run(ifstream &theCardFile);
}; //end class Bridge
#endif
////////////////////////////////////////////////////////////
// Construction/Destruction
////////////////////////////////////////////////////////////
Bridge::Bridge() // error here
{
} // end constructor
Bridge::~Bridge() // error here
{
} // end destructor
void Bridge::Run(ifstream &theCardFile) //error here
{
Hand theHand;
//theHand object is passed the file stream object to its getNextHand method
//as long is getNextHand returns true, a full 13 card hand is obtained
while (theHand.getNextHand(theCardFile))
{
/*theHand.sort();
theHand.score();
display(theHand);*/
}
}
Any ideas as to what might create the error.
Thanks,
Todd