472,791 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

compiler madness??

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!

Mar 4 '06 #1
3 1559
g wrote:
#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!


You forgot the scope for getService() it is:
Service_Handler::getService(). try it!
Mar 4 '06 #2
g wrote:
#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);
I strongly recommend declaring your arguments 'std::string const &'.
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)
Did you mean

Services* Service_Handler::getService( ...

???
{
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()????


You need to make sure you're actually defining a _member_.

Don't be too hard on yourself. Those things happen.

V
--
Please remove capital As from my address when replying by mail
Mar 4 '06 #3
g
Ohhhh my god!!!!!!!!
I dont believe it.......so stupid:-)

thanks a lot!

Mar 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeff Epler | last post by:
Hello. Recently, Generator Comprehensions were mentioned again on python-list. I have written an implementation for the compiler module. To try it out, however, you must be able to rebuild...
1
by: Lane LiaBraaten | last post by:
I am developing a GUI that uses multiple threading.Threads, and Queue.Queues for communicating between the threads, and threading.Timers for checking the queues. Everything works well (runs to...
0
by: rollasoc | last post by:
Hi, I seem to be getting a compiler error Internal Compiler Error (0xc0000005 at address 535DB439): likely culprit is 'BIND'. An internal error has occurred in the compiler. To work around...
3
by: Mark Rockman | last post by:
------ Build started: Project: USDAver2, Configuration: Debug .NET ------ Preparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error...
8
by: - | last post by:
Hi to All, To reproduce: The expression: object result = flag ? (long) 0 : (double) 0; always evaluated as a double... see dissassembly to ensure the bad compiled code.
42
by: Noah Roberts | last post by:
The latest MS compiler "depricates" certain functions including stricmp. The function stricmp is not part of the C++ standard, it is part of POSIX. The question I have, is it really necissary for...
41
by: Miroslaw Makowiecki | last post by:
Where can I download Comeau compiler as a trial version? Thanks in advice.
1
by: =?Utf-8?B?SmFja2Rhdw==?= | last post by:
Hi! I just up-graded my "Dell Help & Support Center" and now every time I start upthe Dell folder is open on the desk top. How do I make it GO AWAY, lest madness overtake me. Thanks! -- DAW
20
by: raylopez99 | last post by:
Took a look at all the fuss about "lambda expressions" from Jon Skeet's excellent book "C# in Depth". Jon has an example, reproduced below (excerpt) on lambda expressions. My n00b take: it's...
0
by: Pavel Minaev | last post by:
On Aug 14, 1:37pm, raylopez99 <raylope...@yahoo.comwrote: You are, of course, entitled to your opinion, but lambdas are a part of C# 3.0, and any C# developer has to know their ins and outs if...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.