@# 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> http://www.lifesite.net/ldn/2006/feb/06022201.html
<0> don't know what to make of that.
<1> yuy0x7 thx for the advice
<1> i already tried
<1> std::string names;
<1> names[0] = "newname";
<1> how can i treat strings like arrays?
<2> std::string names[size]; // array of 'size' std::string's
<2> std::vector<std::string> names; // dynamic vector of std::string's
<3> the same way you treat apples like oranges
<1> right, thanks a lot YUY0x7
<0> http://news.bbc.co.uk/2/hi/science/nature/4736984.stm
<1> just one more thing
<1> and im totally gone :O
<0> uhoh, moving 1 step closer to a national DNA database.
<1> if names[0] == "1"



<3> yes
<1> how could i convert that 1 to and Integer for a function parameter?
<1> to an*
<4> pffft nothing wrong with euthanasia
<2> calc convert2
<5> convert2 = A nice way to convert between data types is to use a templated function to wrap around stringstreams. For Example: template<cl*** TO, cl*** FROM> TO lexical_cast(FROM blah) { TO t; std::stringstream ss; ss<<blah; ss>>t; return t; } . USE: TYPE d = lexical_cast<TYPE>(someString); *Note* this exists in boost as boost::lexical_cast in a better form (with error checking).
<4> in fact, i've been hoping JBlitzen would be euthanized sooner than later
<1> thanks a lot again =)
<0> http://www.statesman.com/news/content/news/stories/local/02/22casinosuit.html
<0> http://news.tbo.com/news/metro/MGBBAMNPXJE.html
<0> rats the size of nerf footballs
<6> what does this mean: <cl*** PEL>
<7> ***
<2> Penis EnLargment
<8> k, getting a little sick of interviews... give me a job already
<0> http://suburbdad.blogspot.com/2006/02/men-in-hats-or-im-glad-i-dont-teach.html
<0> haha
<0> it's peterhu's writing style.
<0> actually, honestly, it's jeffmir's writing style.
<0> but he's not here, so peterhu will have to suffice.
<8> heh
<8> ...LOL
<8> this is good ;)
<9> anyone know how to allocate more memory for a 2d vector? mine works find until i read in a size of 18x18 or larger and i need to be able to have a 160x160
<10> show how you are doing it?
<2> talking about std::vector?
<7> rdragon, skip the job, just give me money
<8> yeah, thanks SB_ ;)
<8> ugnud you don't allocate memory for std::vector's
<7> i'm always good for useless advice
<9> http://www.noidea128.org/sourcefiles/15955.html
<8> what am I looking for?
<7> herpes
<8> found it
<8> err
<7> haha
<7> did you now
<11> table[i][j] = <=== not so good
<9> ?
<7> why are you using an array..
<2> he is?
<11> use push_back
<2> i,j already exists
<12> ugnud: Oh.... and typedef is your friend
<7> YUY0x7, table[i][j] looks like an array to me heh
<2> it's a vector<vector<int> > in his code
<9> it crashes when i enter a size bigger than 17x17 but works fine for smaller than that
<7> YUY0x7, ah, didn't look
<9> thats why i was wandering about allocating more memory
<2> do you know what line crashes?
<11> I would probably fill a temp vector then push it onto the end of the 2d vector each time or something.
<2> you know you can't call main, right?
<2> ugnud ^
<7> haha
<9> as soon as it tries to form the vector visual c++ pops up prog1.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
<11> I htought you could call main.
<9> yeah u can
<11> not a good idea...
<2> no, you can't according to the standard
<11> ah.
<9> it works



<2> "works" != standard
<9> whats a better way?
<9> dont wanna use a goto heh
<2> vector < int >v(cols); vector < vector < int >>table(rows, v); can be written as vector<vector<int> > table(rows, vector <int>(cols));
<11> a loop is a better way.
<13> how do I init a reference var in the constructor of a cl***?
<13> is it possible?
<11> or a function is even better
<2> well, you could just use "continue;" since you already have a loop there
<2> sk8ing, in the initializer list
<13> what's that?
<9> does continue restart the loop?
<11> yes
<2> struct A { int& r; A(int& r) : r(r) {} }; int x = 10; A a1(x);
<13> thanks
<8> no, it doesn't 'restart' it, it 'continues' it
<2> np
<8> starting at the next iteration
<11> good point.
<8> thats why it's called continue :P
<11> they should have a restart hehe
<11> for for loops
<2> just reset the loop var ;)
<8> i've never needed it
<11> indeed
<8> and yeah ;)
<2> for (int i=0; i < N; ++i) { if (blah) { i = 0; continue; } ... }
<11> yes, I realize that.
<2> :)
<11> multilevel breaking would be nice too
<8> goto
<9> i changed the main()
<11> yes... but goto is fugly
<8> so is your face
<8> ;)
<11> my face is not fugly, its ugly.
<11> fugly is reserved for goto.
<8> goto fugly;
<9> but how am i gonna be able to instantiate a vector of size 160x160
<11> ugnud if you use push_bak you don't have too.
<8> bzz
<11> push_back too
<8> vector< vector<int> > vec( 160, 160 );
<8> or, the 'standard' way:
<8> vector< vector<int> > vec( 160, vector<int>(160) );
<0> http://www.foxnews.com/story/0,2933,185543,00.html
<0> interesting.
<11> bbiab
<9> i changed it to that and it still crashes
<14> Why can't we convert a 'double ** ' to a 'const double ** ' ??? I don't see anything nasty in it...
<8> I'm pretty sure you can, The_PAN_
<14> VC++6 doesn't seems to agree :P
<8> VC++6 isn't a C++ compiler
<14> lol I know
<14> but for now I have to deal with it
<8> why not get vc8 ?
<8> and lets see your code, anyway
<8> oh
<8> double** d; const double** e = d; //doesn't work in vc8, anyway
<14> lol
<9> vector< vector<int> > vec( rows, vector<int>(cols) ); didnt help
<8> ugnud that looks fine
<14> ok, so it doesn't seems to be my code, but it's still strange
<8> it sets the initial size for those vectors
<14> I'll try a const_cast ^o)
<8> The_PAN_ yeah I can't explain that one
<9> yeah i changed to that and it still crashes when i enter a big size
<6> what the difference of a++ and ++a ?
<14> it works with the const_cast, but I really don't see why it didn't at first....
<6> and a+=1
<9> the first one is post increment and the last one is preincrement
<8> Valdo - one is preincrement, one is postincrement
<8> a+=1; is the same as ++a;


Name:

Comments:

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






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

#javascript
state receives the least sunshine
What part did Ray Bolger play in The Wizard
Dyalog APL component file
#linuxhelp
kbattleships
#MissKitten
#linux
modprobe -v ide-detect debian problem
#linux



Home  |  disclaimer  |  contact  |  submit quotes