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



Comments:

<0> (<cstdlib> defines NULL, btw)
<1> gotta go get Libby...then off to the "fish fry" at church..... catch you guys in a couple hours
<0> many hours in my case
<0> bedtime for me
<1> ok, I'll see you in 7-9 hours then
<0> cu
<2> geeze
<2> I was wondering why it was so dead in here
<2> I was looking at the #physics channel all day
<2> [15:31] <2> http://www.marginalrevolution.com/marginalrevolution/2006/03/do_we_need_occu.html
<2> [15:35] <2> http://www.nytimes.com/2006/03/02/business/yourmoney/02scene.html?ex=1298955600&en=6e119e6e5af58816&ei=5090&partner=rssuserland&emc=rss
<2> [15:35] <2> The percentage of workers who are licensed varies considerably across states, ranging from a high of 30 percent in California to a low of 6 percent in Mississippi.
<2> [15:41] <2> http://www.marginalrevolution.com/marginalrevolution/2006/03/interview_with_.html
<3> Nice, noidea
<4> i hate netsplits
<4> and the netsplit ends...



<5> what's the problem of this line of code
<5> for(vector<int>size_type i = 0; i != gen_num.size(); i++)
<5> the error is 'size_type' does not name a type
<6> ::
<6> vector<int>::size_type
<5> Ashe`: thank you very much
<6> And it's be better with for (vector<int>::iterator it = gen_num.begin(); it != gen_num.end(); ++it)
<5> i don't like iterator
<6> Why?
<5> very hard to use them
<6> Not sure what's hard
<5> what's an iterator Ashe`?
<5> i been reading c++ books
<7> then you've been reading the wrong ones ;)
<5> about iterators and
<5> there's no proper explanation
<6> Something used to iterate :)
<6> Or just some kind of pointer in disguise heheh
<7> it's an iterator - you use it to iterate over some range
<5> so same with for(vector<int>size_type i = 0; i != gen_num.size(); i++)
<7> not really
<5> or for(int i = 0; i != gen_num.size(); i++)
<7> not all containers support random access
<7> and why would you want to use int as an index?
<7> are you expecting negative indexes?
<5> no
<7> then don't use a signed type
<5> but java and other language usually used int
<5> as index
<7> so?
<5> ok
<7> heh
<6> Java and other languages ****, har har har
<5> :(
<7> java has iterators for collections too, as I recall
<8> I just bought two books: "The Art of Intrusion" and "The Art of Deception," both by Kevin Mitnick
<8> They look pretty good.
<7> neat, let me know what you think of them
<8> Will do.
<8> "Deception" has some scripts of phone calls to banks that show how easy it is to extract information, like merchant IDs.
<9> What's a good site that deeply describes the differences between the various STL containers.
<7> get a book, reed
<7> Josuttis' book is good for the standard library
<7> http://www.rudbek.com/books.html
<9> hah, k
<10> i really wish that sci commercial where a guy turns his dog into a cartoon dog by blowing air through his anus wouuld not air during battlestar galactica
<7> hmm
<10> sci-fi commercial that is
<11> hey guys i think i'm missing an OO concept... taht or i don't remember what it is... cl*** A {} cl*** B : public A { int x; } cl*** c : public A { int y; } /// vector<A *> Vec; Vec.push_back(new B()); Vec.push_back(new C()); <--- how do i set the values for X and Y after that?
<9> peterhu: You know you love it! :)
<6> StaZ[home]: you can't, since you don't know their type
<6> Unless you have a virtual setvalue()
<12> k luz wuat
<10> or use, ick, dynamic_cast
<12> PeReNsEjA, e k tu jode mucho mami :D
<10> the real question should be: why do you need to access derived functionality from base pointers?
<11> thats what i was thinking... a virtual setvalue can have different parameters in the derived? (add a float z; in cl*** C) A::Setvalues(); B::Setvalues(int ix); C::Setvalues(int iy, float iz); <-- ?
<7> no, that doesn't solve your problem
<11> so that won't compile?
<6> It's an A*, Setvalues takes no argument
<11> peterhu well it's an array of 3d objects, Sphere, Cylinders, etc. each objet have their own values



<6> How about you set the value before adding the object to that vector
<11> that's an idea
<11> i make a B newElem; or a B * newElem; ?
<6> Heh
<11> my guess is the pointer...
<6> And you know why too?
<11> caus it's a vector of pointers
<6> You could do &newElem
<11> right, sorry for that should've think a minute more
<11> okay i stop bugging you tahnk you very much ! :D
<7> uh
<7> you missed the point
<7> <6> You could do &newElem
<7> ...but you certainly shouldn't
<11> indeed my element will be destroyed at end of scope
<7> k, good
<11> was that a trap Ashe` ? :P
<6> Nope, it was you missing the point heh
<5> i have a line of code that'll check 2 vectors. if not equal will throw a domain_error exception
<5> if(userNum_sise != generateNum_sise)
<5> throw domain_error("Not equal in sise");
<7> and why would someone use that function instead of just checking .size() ?
<5> my problem is my programs quits
<7> probably because the exception wasn't caught - that's what happens ;p
<13> are you catching the exception somewhere?
<14> why the hell youchecking the size of two vectors?
<14> are these YOUR vectors?
<5> i'm a n00b ok
<7> that's not an excuse
<14> ok, why don' t you tell us the problem, not your non-funtional solution
<5> why my program quit
<5> so rude
<5> it just quit
<14> did you follow the directions in the topic?
<14> and why are you writing your own vectors
<5> it's working now
<5> try and catch
<5> wew
<5> hehe
<7> did you write your own vector cl***?
<5> nope
<7> k
<7> and why do you think a thrown exception is a good response for 2 vectors without the same size
<7> and why can't the user simply call .size() on each and compare?
<5> rdragon: when to use exception?
<14> he never answers questions, he only asks
<5> about your question, i think
<5> throw exception is better than doing if/else
<7> better?
<5> my style
<7> it's not a style issue
<7> it just doesn't make any sense
<5> it's actually a method
<5> vector<int> lottoResult( const vector<int>& userNum_, const vector<int>& generateNum_ )
<5> if the user will p*** a vector of different sizes
<5> it'll throw an exception
<5> rdragon: see my point
<5> rdragon: you there?
<7> *shrug* it just looks like you need a vector of pairs, or of some simple structure
<7> if each index of the 'generate' vector corresponds to an index of the 'user' vector
<7> but it's not clear at all what calling LottoResult() means
<7> LottoResult sounds like a noun, not a verb
<5> i'll change that to lotResult()
<5> or result
<5> rdragon: thank you
<14> you'd probably be better off using std::set for tht
<14> err, that
<14> but if you like vectors, that's ok too
<14> what dos your function do? other than throw an exception if the sizes aren't the same?
<13> accumulate?
<14> and I think
<14> but it's not clear what he's actually doing
<7> javaq_ naming it 'result' isn't any better...


Name:

Comments:

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






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

#javascript
#linux
#c
#AllNiteCafe
4crip
#teens
#MissKitten
aptronyms: the booby trap
FlipGal
#linux



Home  |  disclaimer  |  contact  |  submit quotes