Trouble with CTIME

Started by
5 comments, last by phil05 19 years, 11 months ago
Yo.

void getTime()
{
	time_t currentTime;
	time(&currentTime);
	std::cout << "The current time is " << ctime(&currentTime) << std::endl;
}
 
This function shows this: Sat May 08, 14:57:22 2004 How can I make it Sat May 08 14:57:22 (but make it 2:57:22), and no year?
Advertisement
strftime
i dont know much about ctime. Can you write that in my function script i provided?
lol, and your telling me you wrote this???
Don''t steal from others and claim it as your own, you should first understand c++,ahahhaha you made my day.
Actual Linux penguins were harmed in the making of this message.
quote:Original post by philvaira
i dont know much about ctime. Can you write that in my function script i provided?
No. I mean, I can; I just choose not to. R.T.F.M.
oh god.
Those links lead to C time functions, ctime, ftime and strftime respectively; follow them.

This topic is closed to new replies.

Advertisement