I am trying to basically show in a wxChoice UI element times starting with the current time + 1hr and then every 15 minutes for x times.
I'm experimenting with some code but just getting it wrong. I've gave it a good attempt but just can't seem to work this one out. I'm hoping to get a little help, again
My embarrassing attempt ins below. Again many thanks.
Code: Select all
time_t now = time(0);
size_t minutes = 60;
int exp = 2;
int hours = exp;
int counter = 4;
time_t start_time = (now + (60 * minutes));
// std::cout << std::asctime(std::localtime(&start_time)) << std::endl;
// start_time = now + (60 * minutes) * hours;
// hours += hours;
int time_ = 9;
for (int i = 0; i < counter; ++i)
{
// std::cout << time_ << std::endl;
// time_ += 2;
std::cout << std::asctime(std::localtime(&start_time)) << std::endl;
start_time += hours + 2;
}