Crazy errors!

I am getting the following errors:

1
2
3
4
5
6
driver.cpp:3: error: expected unqualified-id before "using"
driver.cpp:3: error: expected `,' or `;' before "using"
driver.cpp:12: error: `cout' undeclared (first use this function)
driver.cpp:12: error: `endl' undeclared (first use this function)
driver.cpp:14: error: `cin' undeclared (first use this function)
driver.cpp:29: error: `cout' undeclared (first use this function)


I've included everything I need to, so I'm not sure why I'm getting this error... Here's what I have defined in my .cpp (ComplexNumber.h is my custom header file:

1
2
3
#include <iostream>
#include "ComplexNumber.h"
using namespace std;
Are you using an old compiler? I.e. Borland Turbo C++...I would suggest upgrading to VC++ or the Bloodshed group if you are.
I'm using MinGW... I know it's not the preferred compiler, but it's what my professor requests that we use.
In the ComplexNumber.h file, have you correctly terminated the
comples class with a semicolon?
For example:

1
2
3
4
5
class xxx
{


}; //a common mistake is to forget this semicolon 


edited: typo
Last edited on
Topic archived. No new replies allowed.