J
James
Why do I get the error C2597: illegal reference to non-static member
'ClientProxy::User' (plus a bunch of other errors)?
Obviously I'm not defining the passing of an object into a class correctly.
How do I do this correctly?
/* ClientProxy.cpp */
#include "ClientProxy.h"
Campaign RequestCampaign(User CurrentUser);
Campaign ClientProxy::RequestCampaign(User CurrentUser) /* ERROR HERE */
{
return CurrentCampaign;
}
/* ClientProxy.h */
#ifndef __CLIENTPROXY__
#define __CLIENTPROXY__
#include "Campaign.h"
#include "User.h"
class ClientProxy
{
public:
Campaign RequestCampaign(User CurrentUser);
private:
Campaign CurrentCampaign;
User User;
};
/* END CLASS DEFINITION ClientProxy */
#endif /* __CLIENTPROXY__ */
'ClientProxy::User' (plus a bunch of other errors)?
Obviously I'm not defining the passing of an object into a class correctly.
How do I do this correctly?
/* ClientProxy.cpp */
#include "ClientProxy.h"
Campaign RequestCampaign(User CurrentUser);
Campaign ClientProxy::RequestCampaign(User CurrentUser) /* ERROR HERE */
{
return CurrentCampaign;
}
/* ClientProxy.h */
#ifndef __CLIENTPROXY__
#define __CLIENTPROXY__
#include "Campaign.h"
#include "User.h"
class ClientProxy
{
public:
Campaign RequestCampaign(User CurrentUser);
private:
Campaign CurrentCampaign;
User User;
};
/* END CLASS DEFINITION ClientProxy */
#endif /* __CLIENTPROXY__ */