Jump to content
  • Advertisement
Sign in to follow this  
garyfletcher

using-declaration for non-member at class scope - what's wrong? (SOLVED)

This topic is 4870 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a abstract base class declared as: utility.h:
namespace utility
{
    namespace dator
    {
        class BaseDator
        {
            protected:
	           BaseDator(){}
	           BaseDator(BaseDator &b){(*this)=b;}
	
            public:
	           virtual BaseDator &operator =(std::string &s)=0;
	           virtual BaseDator &operator +=(std::string &s)=0;
	           virtual BaseDator &operator -=(std::string &s)=0;
	           virtual bool operator ==(std::string &s)=0;
	           virtual bool operator !=(std::string &s)=0;

	           virtual bool hasMultipleValues()=0;

	           virtual operator std::string()=0;
        };

        /* inherited template classes */

    }
}


I'm trying to declare a std::list of these as:
#include "Utility.h"

class CSettingsManager : public utility::singleton::Singleton<CSettingsManager>  
{
public:
	CSettingsManager();
	virtual ~CSettingsManager();

	void RegisterVariable(std::string name, utility::dator::BaseDator* var);
	void SetVariable(std::string &name, std::string &value, int bias=0);

	void CreateStandardSettings();
	void DestroyStandardSettings();

	void ParseSetting(std::string str);
	void ParseFile(std::string filename);

protected:
	std::map<std::string, utility::dator::BaseDator*> settingMap; /* COMPILER COMPLAINING HERE */
	typedef std::pair<std::string, utility::dator::BaseDator*> settingMapPair;
};


And I'm getting the following compiler error: error: using-declaration for non-member at class scope I'm not too sure what the error means, which means I can't really fix the problem. Can anyone shed any light on this error?

Share this post


Link to post
Share on other sites
Advertisement
Hehe...that might do it. I don't recall seeing that particular error message associated with it before, but if it fixed your problem, great. I see you're using the Enginuity codebase, eh? Good stuff...a few issues, and MSVC 6.0 doesn't like it especially (debug warnings galore...:P), but good stuff.

Share this post


Link to post
Share on other sites
Am indeed...although I'm using it with DEV-C++.

Just taken some of the bit's that I like. Am just trying to get the bit's I've "Liberated" to work within the confines of my own codebase....a few headaches at the moment...but good fun..:)

Is a pity Superpig didn't finish Enginuity off...REALLY good articles..:)

Oh well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!