@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12



Comments:

<0> ...
<0> }
<0> and
<0> 2)
<1> wait
<1> stop
<1> never do that
<0> #include "some.h"
<0> namespace bla {..}
<0> ?
<1> #include is a preprocessor directive
<1> it knows nothing about namespaces
<0> but 1) doesn't work
<0> only 2) works
<0> it gives linker error
<1> you should never #include a header while inside a namespace, the header doesn't expect it.



<1> Sure, because an #include includes the literal text of that header there.
<2> i think i may know why...
<1> If that header defines: int foo();
<2> the #include is putting it in the default namespace
<0> okay, someone told me that namespace should be the first thing in a C++ code
<0> so, i used #include after
<3> they misspoke
<1> then including it in a namespace xyz, suddenly declares xyz::foo, instead of the intended ::foo
<2> if you're using namespace bla, you can't access the things in default namespace
<0> it compiled, but not link
<0> namespaces are funny
<1> [KONQUEROR]: no, start with all #include . That remark that 'namespace should be the first thing' etc sounds like total nonsense - that guy has no clue what a namespace is it seems.
<3> only if you believed whoever told you they were the 1st thing in a C++ code
<0> he was on #C++
<0> :))
<1> you can us namespaces anywhere.
<4> Wonder how it can be so difficult to understand namespaces
<3> THIS C++?
<1> Did he have ops?
<3> who was it?
<0> this one
<0> have no idea
<0> lol, a week or so ago
<3> logs are at home, can't check from here
<1> The ops here are very knowledable -- and so are some non-ops, but other non-ops can say total nonsense and still think they should answer/help.
<0> check
<5> And then there are some idiot ops like Ashe
<5> Those know nothing, don't listen to them
<0> okay, i got anyway
<2> lol
<1> [KONQUEROR]: Anyway, #include-ing a header inside a namespace { } declaration is ALWAYS wrong.
<0> didn't seem wrong for the compiler
<1> headers are written under the ***umption they are included outside a namespace.
<1> That is because it's usually still correct syntax.
<1> Whatever the header declares is then declared inside that namespace - it's just not what you want.
<1> Suppose some author writes a library called libx.
<6> I remember iostream declared as #ifdef STD_NAMESPACE namespace std { #include <iostream.h> } #endif
<1> He puts all his cl***es in namespace libx
<1> then he writes a header like:
<1> namespace libx {
<1> cl*** Foo;
<1> }
<3> melfar yes, not just that one either
<1> If you include that header inside your namespace n1, you get (after the preprocessor included the header):
<3> but iostream.h doesn't exist with vc8
<1> namespace n1 { // from yourfile.cpp
<1> namespace libx { // from libx.h
<1> cl*** Foo;
<1> }
<1> } // from yourfile.cpp again
<1> and then declares n1::libx::Foo
<1> That is something totally different than libx::Foo, so it won't link at all.
<0> okay guys thankx on the namespaces, but now i have to run back to MASM where things are alot easier than namespaces :))
<4> masm is for kids who want to act like they do asm cause it's l33t
<1> masm?
<1> nasm you mean?
<6> you can have _Z7namespace3var labels there too if you are namespace man
<4> No, I mean masm
<4> nasm is "normal"



<7> by any chance could i find a free complete manual for c++ on the net?
<6> alohaarts: books by Eckel is free to download and read online
<3> melfar not really, underscore '_' followed by an UPPPERCASE letter is reserved for the compiler/library writers
<6> are even
<6> ah okay, that would be __Z then
<3> though Eckel's books are neither complete nor that good, IMO
<3> melfar nope, double underscores are reserved too
<7> melfar url?
<6> alohaarts: google for it
<3> alohaarts are you wanting to learn C++?
<6> Bruce Eckel. those are not tutorial books anyway IIRC
<7> i want to learn c++ as a beginner for this language
<3> I recommend the books at http://rudbek.com/books.html
<7> isn't there a free downloadable manual from the net?
<3> alohaarts there are many many books written about C++ there is no "manual"
<7> oki.. but a free beginner book then.
<3> none that I would recommend
<3> one of the ops here has vetted an online tutorial as "not to horribly bad", but I don't have the link handy
<7> how did you learn c++ then? :) if i may ask..
<3> does anyone have that link? Solamente's ?
<3> from those books
<3> and a couple others, that I don't reccomment
<3> s/t/d
<7> i could buy a book too. of course. but i'm only up to 25$ for a complete manual type of book
<3> there no such thing as a "complete manual", that's what I've been trying to tell you
<3> what compiler are you going to be using, btw?
<7> well.. i don't know. could you tell me a good compiler? with hint coding if possible
<7> or... at least a good one.
<7> :o)
<3> for free stuff --- http://www.thefreecountry.com/compilers/cpp.shtml
<3> the 1st link on that page under compilers (vc 2005 express) is quite good
<6> vawjrwrk: are you programming for windows mostly?
<3> melfar currently, yes
<7> sorry bout that.
<7> does it run in win98?
<3> about what?
<7> in explorer mode?
<3> no, it doesn't run in win98
<8> Hey, this is a semi retarded question...but where do I find my local / auto / regular watch windows? I cant find them under, edit, view, window...
<3> possibly the dev-cpp does
<7> oo.. no?
<8> for some reason i only had local and was trying to find auto, close local by accident
<9> Dev-CPP does run in Win98. I have it installed on my other machine.
<10> good bye for today!
<11> mabaa, they're under Debug -> Windows
<7> i heard about dev-cpp isn't this the newest eddition of this language?
<3> DrkMatter thanks. we replaced our Win98 w/ WinXP a couple years back and I no longer recall
<11> while debugging
<8> peterhu, thanks so much
<3> peterhu do you know of any way to con vc (any flavor) to produce unique names in some source?
<11> not that i know of
<8> Now for a potentially trickier question. Why would the auto/local windows go blank at a certain point in my program? its still within the same scope but everything dissapears
<3> ok, thanks
<7> do you mean this one? http://msdn.microsoft.com/vstudio/express/visualc/features/
<12> Hi, I need help conserning MFC and _GetBaseMessageMap... I transfer a project from VC6 to VC7.1 (2003) and I have the following error error C2039: '_GetBaseMessageMap' : is not a member of 'CEditTemplate<T_INHERIT>'
<11> mabaa, not sure why that would happen. is this after stepping in the same function that you previously had autos/locals working?
<12> I tryed to defined the Messagemap macro... doesnt work. Then to derive my cl*** from the CWnd.. still doesnt work
<8> it could be a certain function...right now I have it narrowed down to that its fine before a certain while loop and then breaks after that
<8> looks like the moment it goes into the while loop
<8> so maybe the function called in the test
<1> Should functors be p***ed by value (and why)?
<8> funkters?
<12> "function" one key miss placed right hand ;)
<3> alohaarts yes, that's the one I meant, but I believe it doesn't work on Win98
<1> no, functor
<13> If I allow some memory, lets say "BYTE* test = new BYTE[5]", is there a way further in the program to do something like a sizeof that returns the allocated memory for the test variable?
<13> that would return 5
<12> Does someone here can help me out with MFC?
<1> Anyway - I guess they should, so nm.
<11> tank holding 240,000 of liquid pig manure burst in a town in germany, covering city streets by as much as 20 inches
<11> nice
<8> lol
<11> 240,000 liters
<3> uX use std::vector<BYTE> instead of that


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

#linuxhelp
muppets dinasaurs
parapap
sh ip bgp neighbours *
#java
#MissKitten
#AllNiteCafe
CCNA test 6*7
#linuxhelp
scarletangelblood



Home  |  disclaimer  |  contact  |  submit quotes