Jun 30, 2008 at 9:39pm UTC
Hi,
I apologize if this is too basic a quesiton.
I have a vector<Date> where Date is a class representing a Date. Dates are inserted into the vector in ascending order.
1. I want to get a vector of all the dates upto and including a given date. If the given date is not there, I want to dates upto the given date.
2. I want to provide a begin and end dates. I want to get all the dates in that range. Begin and end dates may not necessarity in the intial vector.
How do I do that. I was looking at find algorithm, but couldn't quite figure out how to do that.
Any help is really appreciated. Many thanks.
John
Jul 1, 2008 at 1:06am UTC
thank you very much.
John
Jul 1, 2008 at 2:07am UTC
Glad to have helped.
BTW, a lot of people are scared of the STL and would not have considered this a basic question.
It has limits and it sure is obnoxious and frustrating when you hit them but often you just need to stare at it a bit and think sideways.
:-]
Jul 1, 2008 at 10:47am UTC
Thanks much for the encouragement. Knowing there are a very nice people like yourself out there who are ready to help is a big relief for beginners like myself.
Thanks again.
John