beachwood23
beachwood23

Reputation: 441

Compiler error: 'expected unqualified-id before "using'''

Here is my code:

    //test file
    #include <iostream>
    #include "stat.h"
    #include "frequency.h"

    using namespace std;

    int main(){
      cout << "helo"<< endl;
      return 0;
    }

When I try to compile, I get:

    test.cc:7: error: expected unqualified-id before "using"
    test.cc:7: error: expected `,' or `;' before "using"

Any idea what is going on here?

Upvotes: 1

Views: 19073

Answers (2)

chikuba
chikuba

Reputation: 4357

You probably missed the ; in the end of the header file.

It should look like this:

 class frequency {
      ...
 };

Upvotes: 8

Max Lybbert
Max Lybbert

Reputation: 20047

The problem is likely an error in the last line of frequency.h.

Upvotes: 2

Related Questions