Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

<Soronel> Kniht: course, cp/m (and dos 1.0 inherited this) didn't have directories
<roopjm> how do you guys remember all the intracicies of everything the stl and c++ has to offer?
<roopjm> no directories? whack
<james-_> roopjm: I just remember where to look things up.
<Kniht> if windows would just allow /DriveLetter/... we could start moving forward
<roopjm> james-_: good point
<james-_> Over time, some of it permeates my thick skull.
<Alipha> roopjm: what you use often, you remember (also anything you find unusual). otherwise, as james said, you look it up
<roopjm> for serious
<james-_> Kniht: UNC paths are heading in a reasonable direction on Windows.
<Soronel> roopjm: the key is not in remembering every API available
<Soronel> and all the params and flags and what not
<Soronel> the key is being able to find the right one when you need it
<james-_> Knowing what capabilities exist and where to find the details is enough.
<Vova> why is it that the copy constructor takes a refrence but not object itslef as parameter;
<job> get a local copy of the platform sddk
<job> sddk*
<job> sdk*
<job> lol
<james-_> Vova: to avoid infinite recursion...
<Vova> Student A(studentB);
<james-_> Vova: p*** by value generally means making a copy.
<Vova> dont we p*** the object itself
<Alipha> roopjm: I would not attempt to code all but the simplist programs w/o a reference
<roopjm> yeah.. i mean i have the STL Pocket Refernce, the C Pocket Reference and the C++ Pocket REference right here in front of me
<Alipha> s/all/any/
<Soronel> Vovo: if the copy ctor took an object instance, the copy ctor would have to be invoked to create that copy
<james-_> Vova: it's p***ed *by reference*. That makes a difference.
<Alipha> I keep C++ in a Nutshell by O'Reilly in easy reach
<roopjm> that one is on the shelf as well
<roopjm> ltes see.. what else is on my shelf right now
<Vova> ahh
<Vova> damn
<Alipha> and then there's msdn and manpages
<Vova> i see it now
<Vova> since its a copy
<Vova> infinite loop
<Vova> ohh dear
<roopjm> Writing Secure Code, Linux application development, linux programming unleashed, the C++ programming language, linux network programming, Beginning, LInux programming, Effecitve C++, Practical C++ programming, MySQL, Essential C++, Accelerated C++, Data Structures and problem Solgving using C++, Writing Great Code, Practical C programming, Visual C+.NET, Code Complete, Writing SOlid Code, and Mastering Algorithms with C
<james-_> ISTR that "Practical C++ Programming" was not a good book.
<Vova> i get the idea.. but the syntax outside of the copy constructor: Student A(studenOhter); --> shouldnt it be Student A(&otherStudent); ?
<roopjm> james-_: istr?
<Alipha> i seem to remember
<roopjm> *makes a note*
<roopjm> its pretty good
<Alipha> Vova: the copy constructor takes its parameter by reference, not by pointer
<james-_> Vova: no, that would p*** a pointer. & means various things.
<roopjm> not the best, but its good
<james-_> Vova: just like * in a declaration means "a pointer to" but in an expression means "the thing pointed to by".
<james-_> Vova: & in a type means "reference" but in an expression unary & means "address of" and binary & is bitwise and.
<roopjm> james-_: what book would you recommend?
<roopjm> other than accelerated c++
<MachinShi> on waht topic?
<Vova> ...but im not p***ing a refrence to it --> outside its just Student A(otherStudent);
<Vova> isnt other student an object
<roopjm> he was just saying that he remembers Practical C++ not being a good book
<Vova> does it make it a refrence when it goes into the copy constructor parameter?
<james-_> roopjm: book for what purpose?
<james-_> Vova: whether a reference is p***ed or not is *not* decided by the caller, but by the function's declaration.
<Alipha> vova: you make references to objects. int x; int &ref = x;
<roopjm> teachin ya c++, gettin into deeper topics than basic bull****, basic procedural ****
<Vova> james i see
<Infinito> hey ppl
<james-_> roopjm: Herb Sutter's Exceptional C++ books are good; Matt Austern on the STL... Josuttis on the standard library, Langer & Kreft on IOStreams and Locales, Josuttis and Vandevoorde on C++ Templates. For fun, "Modern C++ Design" by Andrei Alexandrescu, and the TMP book.
<roopjm> so what does &ref actually do in that instance?
<roopjm> james-_: thanks i always like expanding my library
<Soronel> the iostream book is probably the most dispesible of the reference books
<MachinShi> i don't like austern all that much actually
<Soronel> MachinShi: well, then be glad we've got a reasonable standard library reference
<MachinShi> yah. that's josuttis, imnsho :)
<MachinShi> i think i wanna get the josuttis/vandervoode book. supposed to be real good
<MachinShi> what about 'accelerated c++" ?:)
<Soronel> MachinShi: C++ Templates is an excellent book
<james-_> Accelerated C++ is a good book on using C++ as modern C++ for people who have other programming background.
<james-_> C++ Templates is superb.
<Soronel> MachinShi: after working through that book, alexandrescu's might make sense
<james-_> MC++D was interesting in that most compilers of the time couldn't grok its code because they were buggy.
<MachinShi> hehe
<james-_> Generative Programming is a good book with some stuff on C++ TMP.
<Soronel> jamesd: then boost took a lot of the ideas and added a huge number of compiler work arounds :)
<MachinShi> eh. generative isn't that great. it's a B-/C+ to me
<Soronel> though I did finally figure out how to install the thing so all the libraries are available in one directory
<MachinShi> what's wrong w/ their scheme? it's hierarchical yes?
<maria1980> hi
<MachinShi> hi
<War2> hi
<maria1980> who can explain me this code http://www.rafb.net/paste/results/U1v5ER59.html ?
<maria1980> in particular what is a?
<maria1980> (on line 19)
<Soronel> MachinShi: I'm referring to the link libraries
<MachinShi> it's a varialbe of type A* to a B :)
<Symmetry_> a is a pointer to an object of cl*** B
<Soronel> MachinShi: not the code organization
<MachinShi> Soronel: ok. what's wrong w/ it?
<Symmetry_> or cl*** A :)
<MachinShi> i don't use boost enuf to know
<Soronel> MachinShi: every little piece of boost builds into its own link library
<maria1980> "a is a pointer to an object of cl*** B or cl*** A" ???
<MachinShi> Soronel: explain pls?
<maria1980> so, can i do a->p?
<MachinShi> actually no. since 'p' is a private member
<Soronel> MachinShi: after the install step, boost has 210 libs in a single directory
<roopjm> too legit to ctrl-q
<berty> then alt-f4
<MachinShi> Soronel: how would you want it?
<Soronel> MachinShi: well, for one I would prefer they not decorate the names with the compiler version and flags used for that particular library
<Soronel> I would much prefer they use directories for that
<Soronel> I would /really/ prefer they not mix .dll and .libs into the same directory
<MachinShi> i hear that
<Soronel> sigh, steam is too much for my wifi network to handle copying from one box to the other
<maria1980> Symmetry_: if i declare public *p and *q i cannot access the q member
<maria1980> so, what you wrote is correct or no?
<pulse__> maria1980, do you want to marry me?
<maria1980> sure, if you give me a good answer to my question
<james-_> maria1980: a is a variable of type A* (pointer to A), which happens to point at an object of type B.
<james-_> But I'm married already.
<maria1980> so, i cannot access to q?
<james-_> If p and q were public, you could (at line 19.5) write a->p; or a->q.
<pulse__> maria1980: well I answer the same thing as james-_, but Im not married already
<maria1980> (if i declare it as public)
<Genia4> james-_: I've proven it!
<james-_> Ah... but access to q would need a downcast.
<pulse__> so we have a deal
<Genia4> it's so ****ing simple
<Genia4> I just couldn't see it
<Genia4> it's a 3 liner
<james-_> maria: a's type is A*, so you can only directly access members of the A part of the B object.
<pulse__> it's so simple, but not ****ing enough
<Genia4> now I am enlightened
<Genia4> and I know there is an infinite amount of prime numbers
<Genia4> yay!
<james-_> Genia4: and now you see it, is it pleasingly simple or disappointingly simple?
<Genia4> well
<Genia4> I didn't spend too much time on it
<Genia4> so I'm ok
<james-_> Genia4: did you look at Euclid's proof of the infinitude of primes?
<Genia4> prof gave a small hint
<Genia4> A*B*C*D + 1 is not divisable by A, B, C or D
<Genia4> that's all I needed
<Genia4> he said that sentence, and I had the proof
<james-_> maria: also: if you have a destructor like that, you also should do something about copy ***ignment and copy construction, usually. Either disallow them or make them work.
<pulse__> so maria1980 when do you want to marry me?
<pulse__> how about in a week from now
<james-_> Genia4: that sentence is the essence of Euclid's proof.
<Genia4> now I see it
<Genia4> it's all simple after you solve it
<Genia4> not before


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

unixboard

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact