@# 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



Comments:

<0> strtol*
<0> Ooh, c++, ok ok
<1> bad idea
<1> that code would fail
<0> Given that the string is organized that way, it won't
<0> (I ***ume he checked that is the "format")
<1> if on ;, you will probably crash -- if it does then you will cause undefined behavior in atoi()
<1> s/on/no
<1> oh
<0> ?
<1> nm about the second part
<1> missed the + 1
<1> but still
<2> cortsan: use getline, then find_last_of
<0> I'm just trying to give him the idea, he can use char *, but nevermind, that was just C solution
<3> Then stringstream



<2> ya
<4> I would like the C version
<3> You're in the wrong channel then
<3> /join #c main
<4> I am there too
<0> Don't you dare asking..there..
<3> But you didn't ask there
<3> Ok, now you did ;)
<0> Heh =)
<5> does anyone know how to fill a rectangle with the pen color in MFC?
<6> ::FillSolidRect()!!!
<5> sweeeeeeeet!!!
<2> does cin >> IntYpe fail upon input of a non digit string? or does it attempt some sort of conversion.
<2> intType too
<3> Or how MFC docs made it look like you have to use :: everywhere
<3> Twister2: it fails, if it's not an integer
<2> nice
<6> Ashe`: the :: was habit :P
<2> while (!cin >> intType) { cin.clear(); if (!cin >> stringType) { break; } } <=== is that in any way reliable?
<3> Probably need more ()
<2> for the ! operators?
<3> Yeah
<2> not sure.
<3> I am ;)
<6> This channel needs more cowbell.
<2> actually it would be:
<2> while (!(cin >> intType)) { cin.clear(); if (!(cin >> stringType)){ break; } } if (cin.good()) { intType is valid; } <=== is that in any way reliable?
<2> right?
<3> Ja
<2> down and dirty way to grab the first valid integer heh
<3> Dunno, I never use standard functions :'(
<2> hows come?
<3> Funky target platforms
<2> interestin
<7> Oh embedded stuff - that reminds me. Are there any perfomance issues to using templates?
<3> Templates are compile time
<2> no, the stuff is done compile time
<7> OK. That's what I guessed
<2> it just says... "oh look I need to generate one of these cl***es before I try to compile this further"
<7> OK, cool.
<7> Never quite sure whether some restrictions/non-use issues are "cos we always do it like this" stuff, or whether there is actually a performance-related issue.
<3> Except for the obvious stuff, you check for performance issues when the functionality part is complete
<2> yeah, and enhance the algorithm before enhancing the code
<7> This is modifying existing code, with no time to test much more than that it does the job, unfortunately.
<3> As long as it does the job, it can't be that bad
<2> I found like 3 buffer underruns in code that is like 4+ years old today :)
<2> and almost released a patch with 2 more in it
<2> damned edge cases :)
<3> Difficult to have such bugs when you use vector and such
<2> they were vectors :)
<2> [] operator :)
<3> Iterators, iterators
<2> actually it was a 'smart_vector' so it throws an exception then crashes rather than just corrupting stuff
<3> :/
<3> Doesn't .at throw an exception anyway
<2> yes, this basically did that...
<2> [] calls at
<2> but the exception was unhandled
<2> so the result was still a crash
<7> Night folks.
<2> so, even the 'smart vector' screwed me ;)



<3> I don't think [] calls at
<3> iirc one checks the range and the other doesn't
<2> Ashe`, this was a modified vector
<2> so it had bounds checking on [] too
<3> Who cares about your custom cl***es, I'm talking about std::vector
<8> .at() checks, [] doesn't
<2> this was a modified std::vector, may even be standard
<3> It's not, if [] calls at
<3> Anyway I'm not sure how you manage to get a crash from an exception
<3> Normal people have a catch(...) in main
<2> unhandled exception
<2> most of the time the buffer overflows are caused by people modifying lines of different files and not realizing the side effects
<2> err underflows too
<3> Hm?
<2> cl***a->cl***b->containerc[cl***d->container->memberVar]; weird stuff like that
<2> gets quite annoying :)
<3> I'd just call it ugly code
<2> me too. Its legacy code, and ridiculously huge so refactoring is not exactly reasonable
<4> does fgets() ignore blank lines?
<9> i want my program to "detect" the current dir so the user wont have to enter the dir of the working dir if it is launched in the same dir as the exe file.
<6> Win32?
<10> going to let cppbot collect some data. need to flush out the eventing a bit, and then write some useful plugins
<11> that's a lot of dir
<1> the working directory will be the one where it is running from
<9> yes...
<1> but there is a getcwd() function, at least on *nix
<4> what's the difference between const char* s; and char* s; ?
<6> FatDarrel: ::GetModuleFileName()
<4> when used in functions also
<6> fant0me
<6> even
<6> :)
<9> thanx.... i was "googling" for answers but no luck :p
<6> you'll have to work the string tho...
<9> that's ok that part.
<11> I've already suggested that
<9> god i miss my old "dos.h".
<6> fag
<11> careful in what you say
<11> death row's back in the US
<6> for good reaons.
<6> :)
<9> i am not a "fag"... just a nolstalgic.
<6> Nostalgics die :P
<9> but i dont live in the p***, i am learning to code in winapi now.
<9> switching to the dark side...
<9> not p***.. past.. sory
<9> i am french too... :p
<6> desole :)
<9> you speak french too?
<6> not here
<6> :)
<9> you are from?
<6> UK, you candy-***ed rifle-dropping cheese-eating surrender monkey :D
<12> Hi folk
<9> you are a funny one moo-juice.
<6> Oui
<9> quebec, canada.
<6> British Colony, mon ami :)
<12> Quebec aussi, ici
<9> cool...
<6> I need sleep
<6> I'll faire du bon reve
<6> :)
<9> have goods dreams then :)
<6> Amen Sister
<6> :)
<12> Hey Fant0me, je m'y connais presque pas en programmation mais je cherche complter un petit projet pas trop compliqu serais-tu prs m'aider ?
<9> ca depends...
<9> de quoi?
<9> si je peux t'aider, ca me deranger pas.
<13> Tomorrow Never Dies is on A&E again
<13> As inexplicably as the last time it was
<14> james bond sux


Name:

Comments:

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






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

#AllNiteCafe
#linuxhelp
undernet hasst
openswan left wont nat
#c++
sabryna stone
#squid
otc halucinagins
floccinaucinihilipification
#php



Home  |  disclaimer  |  contact  |  submit quotes