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



Comments:

<0> boost::bind() is puzzling the heck out of me.
<1> Civil law, she says, is more effective. For example, she was asked to represent raped Bosnian and Croat women in a lawsuit against Radovan Karadzic. The result has been Kadic v Karadzic, and she is very proud of it. "We have an injunction against this man ever engaging in genocide again and people he's in contact with ever doing it again.
<1> talk to vawjr
<1> he has the same issue.
<0> I can't figure out why this line won't compile. The error message is about two pages long.
<0> boost::bind(SQLSetEnvAttr, _1, _2, _3, _4)((SQLHENV)0,(SQLINTEGER)0,(SQLPOINTER)0,(SQLINTEGER)0);
<0> Obviously, there's no way it would run properly, but why won't it compile?
<0> It acts like it can't find a matching call for my operator() call.
<0> Er, a matching function.
<0> ...and it becomes an ambiguous call if I specify the function return as bind()'s template argument.
<2> do any of the list types have a function built into it where it can search the list, add if its not found, or return the position if it is found?
<0> holospoof: Lists are slow for searches.
<2> its only going to be like 20 long
<2> also, i need keep track of how many times an instance happends, so i'd have to add/update/sort..
<0> boost::bind(boost::type<SQLRETURN>(), SQLSetEnvAttr, _1, _2, _3, _4)((SQLHENV)0,(SQLINTEGER)0,(SQLPOINTER)0,(SQLINTEGER)0);
<0> "No match for call".



<0> I'm on the verge of concluding that bind is broken under MSVC++ 2005.
<0> Er, not MSVC. g++ 3.3.5, actually.
<0> http://www.noidea128.org/sourcefiles/16158
<0> I wonder if anyone else can compile that.
<3> desoler all pour le jouage de nick amsg dont reply xxx
<4> that family guy rocked
<4> i wonder if they actually put mohammed in there at all
<4> if so i hope it leaks
<4> erm
<4> heh
<4> "family guy"
<4> sigh
<1> Government seems to operate on the principle that if even one individual is incapable of using his freedom competently, no one can be allowed to be free. Harry Browne
<4> that SOUTH PARK rocked
<4> silly extremists
<4> anyone that gets violent over their religion is a stone cold idiot
<1> We can't be so fixated on our desire to preserve the rights of ordinary Americans ... Bill Clinton (USA TODAY, 11 March 1993, page 2A)
<1> It is the fundamental theory of all the more recent American law that the average citizen is half-witted, and hence not to be trusted to either his own devices or his own thoughts. H. L. Mencken
<5> When, in reality, the average citizen is more like quarter-witted.
<5> You stupid eighth-wit.
<4> i think the scientific term is JBlitzen-witted
<5> khan = 16th-witted.
<4> 2^128 witted
<4> time to try my first battleground
<0> vawjr: What was your problem with boost::bind() again?
<6> what's the subtitle of the latest BF game?
<0> Cowmoo: "Now, drudgery has a war."
<5> BF 2142: Don't expect **** to work right this time either!
<0> Battlefield 3. Feel the tedium.
<6> hah
<7> back
<0> BBIAB.
<4> woot we won with a last second cap
<4> that was fun
<8> ok i have a c++ brainteaser
<8> if anyone is in the mood
<7> I suspect you have one even if nobody is "in the mood"
<8> actually, i didnt say it since noone seemed in the mood
<8> mr. gl*** half empty
<5> Haha
<0> vawjr: Ok, so am I crazy, or am I using boost::bind() correctly and it isn't working/
<0> ?
<8> how come you dont BAN carmelina
<8> "set mode: +b carmelia_24
<8> ""
<9> because _ isn't a letter
<8> ?
<9> you think it is?
<8> :( :(
<10> 'lo all
<10> C++ question here...
<10> with structs
<10> Creating an array of structs.
<10> Colour* CC = new Colour[num];
<10> then how do I initialize each element of this array to point to a newly created struct?
<10> CC[i] = new Color() ...doesn't seem to work.
<9> they're already all structs
<9> CC[0] is already a struct, CC[1] is a struct too
<10> howcome???
<10> I declared CC to be an array of struct POINTERS.
<9> because you did Colour* CC = new Colour[num];



<9> no you didn't
<9> unless Colour is some weird typedef
<11> hey again
<11> sorry about that - got disconnected
<9> hi
<11> so why do I now have an array of structs, instead of struct pointers :(
<7> why do you want to use an array anyhow?
<6> apcxx: you should use an std::vector instead..
<11> umm... ok ....
<11> howcome?
<7> so you don't have to worry about the memory management
<11> how so?
<6> because then youd on't have to do your allocations and deallocs manualyl
<9> depends what he needs to do
<11> I'm not a he :(
<9> ah
<9> she :)
<7> not if she's callling new
<6> cn28h: doesn't matter
<6> in this case
<11> but if I create an ARRAY of structs, when deallocating ... I just have to say like, for each element in the array, delete the struct, then call delete on the name of the array, right?
<7> apcxx no
<7> test
<11> then how does it work?
<7> apcxx among other things that's why we suggested vector
<11> how will the memory allocation and deallocation work with a vector?
<5> Awesome south park episode. Exactly what I think of family guy.
<7> std::vector<Colour> CC(num);
<11> do I add to the vector, structs or struct pointers?
<7> when CC goes out of scope, all the memory will be given back
<11> but I'm p***ing CC to another method :(
<11> which will then use it, and clean it all up.
<9> since it's automatic storage, if you p*** it to another function it will still exist until the function that created it returns
<9> then you don't really need to clean it up in the other function
<11> oh...
<7> hmmm, my client seems to be acting up
<11> so then..
<11> what exactly do I add to the vector? structs, or struct pointers?
<9> well, you can do either but it makes more sense to do structs
<9> in this case
<11> and can someone plz explain why the line Colour* CC = new Color[num] ...gives me an array of structs, instead of struct pointers each of which is waiting to be initialized to "new Colour()"?
<7> apcxx and what I showed, there are already "num" structs in the vector
<7> because that is what you asked new for Color not Color*
<7> but why don't you quit worrying about arrays and pointers and just use vector
<6> CC is a pointer to the beginning of the storage block in this case
<11> ok...
<6> which contains Colours
<11> so "new Colour[num]" actually creates a set of structs? :(
<7> an array
<11> is this true for structs only, or if I had a Dog cl***, would Dog[num] create an array of ACTUAL dog objects?
<7> yes
<7> btw, the difference between struct and cl*** is negligable
<11> in the dog array case, how do I specify different constructor parameters for each new dog?
<7> you don't
<7> btw, struct can have constructors also
<11> but what if I want each dog in the array created differently? but all dog pointers stored in the array. How do I control that?
<7> ***ign them after you create the array
<7> or use std::vector and push_back()
<11> but the dogs have already been created!
<7> if you say so
<7> where did you put them?
<11> Dog* d = new Dog[num];
<11> you said that creates an array of actual dog objects.
<7> no, that created an array of Dog
<7> yes, you really are gonna stick with the pointers and arrays aren't you
<7> <sigh>
<11> no
<11> I just want to fully understand this
<7> how about forget about pointer and array for a while
<7> I recommend the books here: http://rudbek.com/books.html
<11> I just want to fully understand it :P
<7> the 1st book there doesn't get to that until chap 10
<11> ok... I'm going to investigate vectors, really :P
<11> just one more question


Name:

Comments:

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






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

#linux
patata il-forn
#c
C# singelton arguments
javascript caret position value.search
#c
bulova quartz t8
#teens
#chatzone
#linux



Home  |  disclaimer  |  contact  |  submit quotes