| |
| |
| |
|
Page: 1 2 3 4 5 6 7
Comments:
<0> man cols is a string type <1> NO IT IS NOT <0> ok <0> but how come it's not <0> lol <1> ok, what do you think greeting.size() is <1> and it's not because they tell you it's not <1> they explicitly say it's a onst std::string::size_type <1> err, s/onst/const <1> but you still haven't answered my question about what is greeting.size() <0> std::string greeting = "Hello, " + name + "!"; <1> that isn't what I asked <0> when you say greeting.size() <1> I'll ask again slowsly <1> what <1> is
<1> greeting.size() <0> means determine the size of the string inside greeting <1> ok, yes, it's a NUMBER <1> now the question is.... what _kind_ of a number <0> yup returns a number, size() <0> integer <1> nope, sorry <1> well, it's an integral something, yes <1> but if you were going to do cols = greeting.size(); <1> what TYPE should cols be <0> :( should be an int <0> yeah <1> nope <0> why that cols is string <1> NO NO N O NO NO <1> suppose int won't hold a large enough number ...then what? <1> on some systems, int is only 2 bytes <0> long int <0> size_type cast that string into int <1> that may not be long enough either...but std::string is in the standard library.... what should they return from size() ? <0> got it now <1> wrong again <1> you keep jumping to conclusions rather than following what I'm saying <0> what should they return from size() ? int or double <1> do they write the docs and say, well on some systems size() will return an int <1> on others long int <0> see that's the problem of c++ no proper documentations of its library <0> not like java <1> wrong again <1> god you're stubborn <1> I'll tell you since you simpley REFUSE to go there it returns a std::string::size_type <0> vawjr: i already answered your question <0> what should they return from size() ? int <1> WRONT <1> AND WRONG <1> int isn't big enough on some systems <2> pee eporothike toutos ;p <1> and I don't give a rats patuti what Java does <2> aha.. cool <2> bye <1> javaq_ as long as you keep trying to put things in terms of what "Java does" you're going to have problems <2> ate ciao .. exume jialles doulies enen mono to pc ;// <2> Musophobia is the fear of <3> I miss c-bot. <1> I don't <1> must have been a drunk student from UCI <3> Alright. <1> javaq_ do you "have it" yet? <0> vawjr: is c++ hard to study? <1> I don't think so at all, and I believe you have the best possible book to start with <1> the PROBLEM is that you think you know already <0> lol, i don't know yet <0> that's why i'm asking <1> but you were making all sorts of ***umptions about std::string::size_type cols = <1> that were unwarranted <0> ok sorry <1> and I'm SURE that Koenig & Moo explaing it in excruciating detail <1> if you're going to stop reading evrey time you see something you don't understand, you're NOT going to make good use of that book <1> they give the example code 1st, THEN go through it line by line with explanation <4> how do i convert from a string to a float?
<5> stringstream <5> stringstream ss( "1.25" ); ss >> f; <3> strtod() <3> http://www.cplusplus.com/ref/cstdlib/strtod.html <4> thnx <5> (#c++, not #c ;)) <3> Oh. Right. My bad. <5> Not that it wouldn't work anyway <4> lol <4> is stringstream in the string library? <4> oh iostream <4> nm 8 ) thnx <5> #include <sstream> <4> ahh <4> wow that is such a cool cl*** <5> Yes, it gets all the chicks <4> lol <6> 8 ( <7> 8 ) <8> hello!:) <7> I've come to **** your bitz and bytez <7> 1 hahahahaha <7> 0 hahahahaa <7> 1hahahahah <8> anybody knows of a really really good algorithm-data structures book? <3> Introduction to Algorithms <8> something that could be considered a "Bible" <8> by whom? <3> by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein <8> thanks:) <8> how about Dijkstra? <7> sorry 8 ) <3> Did he write an algorithm book? <3> # Hardcover: 1184 pages <3> # Publisher: The MIT Press; 2 edition (September 1, 2001) <3> # Language: English <3> # ISBN: 0262032937 <3> # Product Dimensions: 9.3 x 8.3 x 2.1 inches <3> # Shipping Weight: 5.2 pounds. <3> It's good for both algorithms and killing small land animals <8> yes he's written some but I dont know what the programming world thinks of them... maybe they are a bit too specific? <8> that's the Introdution to Algorithms one? <7> lol <3> Yeah <8> :) <5> I't have been nice to have [0] automatically do this->operator[]( 0 ) <5> Instead of doing (* this)[0] <5> It'd, even <9> hi. anybody here have experience using hash_sets from SGI's STL extensions? <10> just ask <9> ok, I have some code that uses an STL hash_set to hold alot of data, everything works great with acceptable run times, except for when i go to delete the hash_set, unfortunately i need to iterate over the hash_set calling a dedicated destructor fot each object, the objects arent really destroyed, simply moved to a free list. since hash_set iterators are const, i have been using following code (will paste) <9> while(!hSet.empty()) { Object *obj=static_cast<Object *>hSet.front(); hSet.erase(obj); obj->release(); } <9> ops <9> The hash_set has anywhere from ten thousand to several hundred thousand objects (or more!) in it. The runtime can handle linear complexity, but anything larger than O(n) is going to be too slow <5> Write a small wrapper around your objects, that will call release() <9> ideas? <5> And it's const_cast anyway, not static_cast <5> You're welcome <11> =)) <12> anyone willing to help me out with a debug session? i have a linux program, which i got installed for FreeBSD now, but it gives me an error, therefor, the people of FreeBSD Help channel told me that i will have to debug the program... <12> i have the binary, a core file and i am able to use gdb <12> server owner access, so root or other privileges are no probs <12> Silex, this would be the first time i ever do this... so i want to be sure i do it right <13> is size_type a date type? <13> data* <5> Sure <14> ((~ <14> ~)) <14> sal frumusicafok }{ <14> type /rjcancel #timisoara <14> tora to piase? <14> (( <14> }}}}}}}
Return to
#c++ or Go to some related
logs:
avihooi #MissKitten deleting 1.2 million rows mysql
#MissKitten #linuxhelp SUSUT MAURITIUS Con_Fu_Se #chatzone Warning! dlname not found #linux
|
|