Re: [Dev-C++] Demystifying namespace
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <ce...@te...> - 2003-12-18 22:54:50
|
Hum, I think when you asked that, and said the exclamation next, it
sounds like you're saying that guy that he's a dumb guy and he should
learn again, not that you say you feel like needing to re-read some
books. And he got offended. Indeed, your phrase sounds a little hard to
my ears.
However, his answer is still too hard, I think.
María Cristina Ma. Er, no, Merry Christmas.
Maya wrote:
> I apologize if you felt offended. Perhaps you are a much better
> programmer than I am, at least that is what you presume; as you said,
> you have the programming knowledge and experience that most people in
> this mail list would only dream of having. If only a little bit of
> good manners and a better knowledge of the English language would
> accompany your "outstanding" knowledge of C++ programming, I am sure
> you would be a much, much better person.
> To the other members here I say, pd...@xs... does not by any means
> represent the good nature and/or mature behaviour we adhere to here.
> I, as most serious programmers in here, will block any farther
> communication with this individual.
> Best regards, and have a Merry Christmas.
>
> pd...@xs... wrote:
>
>> Don't get cocky you little shit, you're the one having problems, not
>> me. I
>> have more programming knowledge and experience than you could ever
>> hope to
>> acquire, so you'd better just shut up.
>> I tried giving you friendly advice, you spit it in my face, so now
>> you can
>> just fuck off and die for all I care, asshole.
>>
>>
>> -----Original Message-----
>> From: Maya [mailto:Esc...@ne...] Sent: Thursday,
>> December 18, 2003 9:34 PM
>> To: pd...@xs...; gtk...@gn...; C/C++ Programmers; Dev - C++;
>> Gtk+
>> mailing list
>> Subject: Re: [Dev-C++] Demystifying namespace
>>
>> I want to replace the word __func__ with the word file, and you are
>> telling me to assign the value of __func__ to the std::string variable?
>>
>> Gotta check those books again, eh!
>>
>> pd...@xs... wrote:
>>
>>
>>
>>> You shouldn't use #defines. #defines are cross-everything, they
>>> don't care
>>> about scope, namespaces, functions, whatever. It's just a simple global
>>> search&replace operation performed by the preprocessor. If you want
>>> your
>>> namespace code to work, change it to something like:
>>>
>>> namespace foo{
>>> const std::string file = __func__;
>>> const size_t line = __LINE__;
>>> }
>>> Note that I didn't test this though, but it should work (and didn't you
>>>
>>
>> mean
>>
>>
>>> __FILE__ instead of __func__ there?)
>>>
>>> Regards,
>>>
>>>
>>> Paul
>>>
>>> -----Original Message-----
>>> From: dev...@li...
>>> [mailto:dev...@li...] On Behalf Of Maya
>>> Sent: Thursday, December 18, 2003 7:49 AM
>>> To: C/C++ Programmers; Dev - C++
>>> Subject: [Dev-C++] Demystifying namespace
>>>
>>> I have a little bit of a problem with 'namespace'. Here is my problem:
>>> namespace foo{
>>> #define file __func__
>>> #define line __LINE__
>>> enum error_t {one, two, three};
>>> }
>>> namespace foo{
>>> class loo{
>>> public:
>>> loo(){
>>> std::string f = foo::file;
>>> size_t l = foo::line;
>>> std::cout << "file: " << f << " line: " << l << std::endl;
>>> std::cout << foo::one << foo::two << foo::three <<
>>> std::endl;
>>> }
>>> };
>>> }
>>> These std::cout's give me a parse error, what am I doing wrong?
>>>
>>>
>>>
>>
>>
>>
>>
>
|