HackerBoss
HackerBoss

Reputation: 829

C++ #include error

I have two files functions.h and functions.cpp. The first has declarations of various functions and the latter has definitions. At the top of functions.cpp I have the statement:

#include "functions.h"

my compiler tells me I need a semicolon after this, but I don't. What is wrong?

Upvotes: 0

Views: 199

Answers (2)

xyCoder
xyCoder

Reputation: 110

This problem usually is generated when you declare class in function.h forgetting add semicolon in class last block; eg:

class Test {

}

right answer

class Test {

};

Upvotes: 4

Arun Sharma
Arun Sharma

Reputation: 517

One possible suggestion is Check your Functions.h for Error.

Upvotes: 1

Related Questions