G
g
#ifndef SERVICE_HANDLER_H_
#define SERVICE_HANDLER_H_
#include <string>
#include <map>
class Services;
class Service_Handler
{
public:
Service_Handler();
virtual ~Service_Handler();
Services* getService(std::string transaction,std::string arguments);
private:
std::map<std::string,Services*> transactions;
};
#endif /*SERVICE_HANDLER_H_*/
#include "Service_Handler.h"
#include "Services.h"
#include "CreateCustomer.h"
Service_Handler::Service_Handler()
{
transactions["aaa"]=new Services;
}
Service_Handler::~Service_Handler()
{
transactions.erase("aaa");
}
Services* getService(std::string transaction,std::string arguments)
{
transactions.erase("aaa");
return NULL;
}
.../Service_Handler.cpp: In function 'Services*
getService(std::string, std::string)':
.../Service_Handler.cpp:17: error: 'transactions' was not declared
in this scope
!!!!!!!!!!!!
how it's possible??????????
why I can't use transactions in getService()????
please help!
#define SERVICE_HANDLER_H_
#include <string>
#include <map>
class Services;
class Service_Handler
{
public:
Service_Handler();
virtual ~Service_Handler();
Services* getService(std::string transaction,std::string arguments);
private:
std::map<std::string,Services*> transactions;
};
#endif /*SERVICE_HANDLER_H_*/
#include "Service_Handler.h"
#include "Services.h"
#include "CreateCustomer.h"
Service_Handler::Service_Handler()
{
transactions["aaa"]=new Services;
}
Service_Handler::~Service_Handler()
{
transactions.erase("aaa");
}
Services* getService(std::string transaction,std::string arguments)
{
transactions.erase("aaa");
return NULL;
}
.../Service_Handler.cpp: In function 'Services*
getService(std::string, std::string)':
.../Service_Handler.cpp:17: error: 'transactions' was not declared
in this scope
!!!!!!!!!!!!
how it's possible??????????
why I can't use transactions in getService()????
please help!