Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

phil05

Trouble with CTIME

This topic is 5130 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yo.
void getTime()
{
	time_t currentTime;
	time(¤tTime);
	std::cout << "The current time is " << ctime(¤tTime) << 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?

Share this post


Link to post
Share on other sites
Advertisement
i dont know much about ctime. Can you write that in my function script i provided?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Those links lead to C time functions, ctime, ftime and strftime respectively; follow them.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!