Missing something here...

W

Willie

I am really not sure why I'm getting an error with this code
"testRational.cpp", line 5: Error: Use ";" to terminate declarations.
it just doesn't make any sense to me so I figure I must be overlooking
a stupid little thing that somebody else can see which I'm blind to.

-------testRational.cpp-------------------
// Test driver for Rational number objects
#include "Rational.h"


int main() { //line 5
Rational r1(4, 5);
}

-------Rational.h-------------------------
#ifndef _RATIONAL_H_
#define _RATIONAL_H_

#include <iostream.h>

#endif

class Rational {
public:
Rational(int, int);
}
 
?

=?iso-8859-1?Q?Juli=E1n?= Albo

Willie escribió:
-------Rational.h-------------------------
#ifndef _RATIONAL_H_
#define _RATIONAL_H_

#include <iostream.h>

#endif

class Rational {
public:
Rational(int, int);
}

A class declaration must end with ;

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top