error expected ; at end of member declaration

i m getting error
error: expected ‘;’ before ‘(’ token

on line 121 of this code
u_int32_t* decode(string[8]=NULL, string[2]=NULL);
the code is part of this header library
http://pastebin.com/NS8V0ByK
and the function definition is in this code at line 217
http://pastebin.com/M9fuppa1

it is kind of urgent so kindly any of you can help i will be thankful.
i am compiling on Ubuntu 12.04 32bit with gcc (Ubuntu/Linaro 4.5.3-9ubuntu1) 4.5.4
I am not going to look through your references and do not advice others to do so. It is you who shall show relevant code.

If to take into accout that string is std::string and a using directive is present then the statement you showed here is correct provided also that declaration of u_int32_t is visible.
well i have shared the pastebin codes because that made sense to me by not cluttering the post with huge code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class EPCCode {
       
    public:
        EPCCode () {};
        EPCCode (u_int32_t[3]);
        //static int check(u_int32_t[3]);
        inline u_int32_t* getCode() {return code;}
        void setCode(u_int32_t[3]);
        u_int32_t* decode(string[8]=NULL, string[2]=NULL);      
        static int ccmp(EPCCode a,EPCCode b);  
        private:
        u_int32_t code[3];
       
};


and its definition is at line 217 of code in this paste
http://pastebin.com/M9fuppa1
As I said this code has no errors provided that header <string> is included and either there is directive using namespace std; or using std::string;
he code you posted to the forum compiles without warnings, as you can see here: http://ideone.com/4geHw (providing the necessary includes and typedefs)

The code you posted on pastebin stops compiling at the missing "config.h", long before the diagnostic you're describing.

Trim your program down to an example that reproduces the problem on http://ideone.com (it's an online compiler), then you're more likely to find help online.
Topic archived. No new replies allowed.