Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > singleton
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 44115 of 48044
Post > Topic >>

singleton

by Ron Eggler <test@[EMAIL PROTECTED] > Mar 25, 2008 at 11:43 PM

Hi,

I'm trying to define a sinlgeton class but I'm having troubles to get it
compiled, my declaration looks like:

#include "tspthread.h"

#ifndef GPIOCONTROL_H_
#define GPIOCONTROL_H_


class GPIOcontrol: public TSPThread 
{
public:
        static GPIOcontrol* Instance();
        
protected:
        GPIOcontrol();
        virtual ~GPIOcontrol();
                
private:
        /**
         * The main thread method
         */
    virtual void run();
    static GPIOcontrol* pinstance;
};

#endif /*GPIOCONTROL_H_*/

But it doesn't compile on the line "static GPIOcontrol* Instance();" it
tells me "error: candidate is: static GPIOcontrol*
GPIOcontrol::Instance()"
and i don't understand what coudl be wrong, any help would be appreciated!

Thanks!
Ron

-- 
chEErs roN
 




 3 Posts in Topic:
singleton
Ron Eggler <test@[EMAI  2008-03-25 23:43:38 
Re: singleton
Ian Collins <ian-news@  2008-03-26 12:48:09 
Re: singleton
Ron Eggler <test@[EMAI  2008-03-26 17:38:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:42:16 CDT 2008.