error: expected ')' before '*' token

I thought this would be simple, but I am stuck.
What could be causing this error?

main.cpp:
1
2
3
4
5
6
#include "Code.h"
#include "Key_1Code.h"

int main()
{
}

Code.h:
1
2
3
4
5
6
7
8
#ifndef CODE_H
#define CODE_H

class Code
{
    void p() {}
};
#endif 

Key_1Code.h:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef KEY_1CODE_H
#define KEY_1CODE_H
#include "Code.h"

class Key_1Code
{
    private:
        Code* ptrScanCode;

    public:
        Key_1Code(l_Code* ptrScanCode): ptrScanCode(ptrScanCode) { }

        void press();
        //void press() { ptrScanCode->p(); }//this compiles
};
#endif 

output:
1
2
3
4
C:\indirect3>g++ main.cpp
In file included from main.cpp:2:0:
Key_1Code.h:11:25: error: expected ')' before '*' token
         Key_1Code(l_Code* ptrScanCode): ptrScanCode(ptrScanCode) { }

I appreciate your help.
Last edited on
I think line
11
12
 Key_1Code(l_Code* ptrScanCode): ptrScanCode(ptrScanCode) { } 
 
is supposed to be Code and not l_Code.
Last edited on
Right you are.
Thanks for your help giblit!
Topic archived. No new replies allowed.