I'm using visual studio for the program. When i prompt the user for date like is this format -dd/mm/yyyy . For the program how do i use the data for just the year only not the whole input?
pokemon123
0
Newbie Poster
Recommended Answers
Jump to PostThat depends - Do you have an example you can post of the code where you're reading input from the user?
Jump to Postcin>>"Enter a Date(1)">>endl;
then the user enter 7/03/2007. But i need the year which the user input for other purpose like checking leap year.That doesn't help. Please post the actual code, and not a mock-up.
All 6 Replies
Bench
212
Posting Pro
pokemon123
0
Newbie Poster
Bench
212
Posting Pro
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
pokemon123
0
Newbie Poster
iamthwee
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.