@# 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 13 14 15



Comments:

<0> yea
<0> yes yes
<0> I know I know
<1> Not like the movie is related to Asimov
<1> Except for the title
<1> But still
<0> no
<0> and the 3 laws
<2> question i have a string that i want to convert to ASCII i know i can do it in a loop and just do cout<<int(var[i]) but i want to save whatever it outputs into lets say another string, (the ascii value of previouse string)
<2> for example EOF -> 454f46 i want to save that in a new string
<1> It's already ascii
<2> so everytime i want to output it as 454f46 i'd have to do int(str[i])
<2> in loop
<1> Make a function
<1> And you could probably use copy()
<1> Not sure why you want to have that in a string



<2> well i could use it as an int too either way i suppose
<2> but i think i gots it
<0> like golem?
<3> did anyone understand what JaZyOSX was babbling about?
<4> I don't know
<4> he came in yesterday and said he's got hex data in an unsigned int
<4> but he needs it in decimal
<4> how does he convert
<4> I said
<4> stringstream ss;
<4> unsigned int var = 0xdeadbeef;
<4> ss << dec << var;
<4> ss >> var;
<4> laughing to myself
<4> a few minutes later he comes back and says, "That worked, thanks."
<4> shocking the hell out of me.
<0> hahaha
<1> Scary
<0> new TT looks quite sweet
<4> serisouly, I even had him paste his own code
<4> because, clearly that works
<4> but he said he had an issue where his numbers were all printing as hex
<4> and somehow he thinks that code fixed it.
<3> how is it that people don't understand that decimal, octal, and hex are ONLY external forms? i.e. human readable
<1> It's cause their IQ is a single hex digit
<4> whatever
<4> he had a bug in his software apparently
<4> right up until he put my code in there.
<3> maybe he doesn't understand that << oct << dec << hex are "sticky"
<5> Hello! I'm having a problem using the STL map container... my cl*** makes use of a map (composed by a pair of a std:string and a pointer to another cl***); though in my current code i'm not adding elements to the map yet, when i close the app, at some point after the rest of my code have successfully released its memory resources, I get a crash in the "xtree" file, at method "iterator begin()"... can anyone help me please?
<4> that's what I thought.
<3> what kind of "crash" ?
<5> Access violation reading location 0x00000000
<1> Sounds like dereferencing a null pointer
<3> it does
<5> but there are no entries in the map...
<3> that means that *begin() is undefined
<1> Post your code
<5> at www.noidea128.org, right?
<1> Anywhere you want
<1> Except in the channel
<5> ok! thanks, just a sec
<2> i'll show you my mess once it's all done noidea
<5> ok, the code is at http://www.noidea128.org/sourcefiles/16162.html
<3> there's no code there
<3> and TTableEntry is NOT what's in TTable
<3> though TTable::value_type is
<5> yes... the code is there... and a TTableEntry type is what I insert in the map...
<3> no you won't
<5> vawjrwrk: it's just another way to define it
<3> wrong
<3> your definition is incorrect
<3> and there is NOT ****ing code posted
<3> nothing you posted will execute
<3> it's all declarative
<5> i know... but the problem is there... because i'm not doing anything else with the map member (Table;
<5> sorry, m_Table member i meant
<5> the rest of the code is irrelevant
<3> you SAID it was in iterator begin()
<5> that's where the app crashes when i close the app!



<3> there is no reason for begin() to be called in what you posted
<5> i do know, that's why im asking here :)
<1> I doubt it's the only thing you have in your app
<3> there is no reason for any TTable to be ever constructed
<1> (+ use value_type for your TTTableEntry)
<3> you've just _declared_ that IF someone instantiates a CAnotherCl*** one will be
<1> Looks like it's been said above already
<3> btw, what compiler are you using ??
<5> msvc
<3> version?
<5> 2003
<3> you are ***erting that IF I take that code, put it in a file and try to compile and run (run WHAT???) it will blow up?
<4> don't do it vawjr!
<5> i'm not posting the whole code because it's from a really big project, so to show you any running code i'd have to post lots of files which are irrelevant to the problem...
<4> the FBI investigates explosions!
<3> MUUHH but you're SURE it in what you posted
<5> yeah... because that is the only piece where i'm using any stl container...
<4> well, I see the probelm
<3> but there is NO CODE there
<4> problem
<4> he forgot std:: in front of his typedefs
<3> NOTHING executes
<3> so it canNOT blow up
<4> and he's not including the header for map
<3> or for pair
<4> well, map includes pair
<4> so, he at least needs map.
<5> Noidea: i'm using std namespace, and have included needed headers... my app compiles and run, the problem is that, when closing it, it crashes in the iterator begin method!
<5> it's not a linker or compiler problem :)
<3> he's NOT gonna show us how anyone MIGHT be calling begin() so **** him
<0> im not gonna **** him
<5> vawjrwrk: because no one actually calls begins anywhere in the code!!
<6> (_)
<6> #vb.gr - LOL
<1> VB is that much gay
<6> why should there be a greek vb channel ?
<0> haha
<3> MUUHH you haven't yet ***erted that there is in existence anywhere an object of CAnotherCl***
<6> LOL MrAshe
<5> [vawjrwrk] because it's irrelevant... i've been checking the call stack and the destructor of the existing instance of CAnotherCl*** have been already called with no problems...
<3> MUUHH _obvioulsy_ you know a lot more about debugging than I can ever hope to...so solve your own problem
<3> and I'll wager you are wrong about the relevance
<5> vawjrwrk: thanks, you should check a good text about map container and valid key/value combinations...
<3> MUUHH I have
<3> much better than whatever piece of **** you're reading
<5> [vawjrwrk] then you should now you can use pairs as well
<7> I have seen this happen too many times...
<3> I do, but YOU should know taht the key is const
<3> so read ALL the words in the examples
<3> you don't get to skip the ones you don't like
<5> [vawjrwrk] do you have any complex at personal or professional level that you need to be so "polite" and "wise"?
<3> MUUHH another thing.... most of the bad pointer error causes are rarely near the place that "catches" them
<3> MUUHH I'm only rude to "know it alls" that can't seem to post things correctly
<3> and when we point it out, insist that they've not made errors
<1> Yeah, you're always rude to me vawjrwrk :(
<3> well, you're a special case
<8> MrAshe that's because you're a midget... and the only thing vaw hates more than rude know it alls are midgets
<8> small hands... smell like cabbage
<4> seen what happen too many times IRR?
<3> me being rude, I suppose
<7> Noidea I was expecting a kick after a sentence or 2 from MUUHH
<7> With a Sorry you had your chance
<4> I don't know, he could be more helpful
<4> posting a cl*** declaration
<4> and saying this makes my program crash
<4> help me
<4> is pretty much useless.
<4> he shouldn't be declaring the pair himself
<4> that's done inside the map cl***
<4> he shouldn't be doing a using namespace std; in the header file
<4> and, he SHOULD be posting more code that is relevant.
<4> and giving more information.
<9> Heil Noidea
<9> =P


Name:

Comments:

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






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

#linux
#php
#linux
#linux
#AllNiteCafe
#php
#php
12WHO MET CYCLOPS ON HIS THIRD VOYAGE?
#linux
#MissKitten



Home  |  disclaimer  |  contact  |  submit quotes