Hello;
I have a vector :
I need to do the following(or equivallent)Code:vector<string> word_vector;
Code:word_vector.push_back(an infinate value);
someone please help!
Hello;
I have a vector :
I need to do the following(or equivallent)Code:vector<string> word_vector;
Code:word_vector.push_back(an infinate value);
someone please help!
What do you mean by "infinite value"? Do you mean you want to push back an infinitely large string? If so then the biggest a string can possibly be is equivalent to the value returned from the max_size member function.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
no, I am doing the mergesort, the inplace merge and I need a value that will never be changed by the sort
If you could give me a different algo for the merge with a vector of strings I could use that too --- instead of the above question
A "different" algo? How can you get a different algorithm if nobody has seen your current one?
You should not be needing infinite values on the ends of your vectors for merging. I know why you want one -- you need to use a special check to see if you've reached the end of the vector.
How can you push an infinite value when it is infinite? That makes no sense.
The size of a vector can be retrieved by calling vector::size().
The highest value on a 32 bit platform is 64 bits long - via long, you will have to work out the math. Even on a 64 bit platform, the highest value is 64 bits, I doubt you will ever need the value to go past that to be honest, so consider it infinite
-"What we wish, we readily believe, and what we ourselves think, we imagine others think also."PHP Code:
sadf