Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 17th, 2007, 10:30 PM
Registered User
 
Join Date: Oct 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to accept DateofBirth from user in C/ C++ lang

Hello,

I want to know how to scan the value from the user for the birth-date of the employees.

How can i accept it in two different ways :

1) 16 October,2007 :?:
2) dd/mm/yyyy :?:

If anyone expert in the C Programming language then do pls reply back to me.

Waiting for the answer.

Is <time.h> library tobe added ??

Thanxs.




Reply With Quote
  #2 (permalink)  
Old October 25th, 2007, 10:27 PM
Authorized User
 
Join Date: May 2007
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to Peter_APIIT
Default

First of all, you need to include<time.h>

1. u also need to declare a struct tm variable/object.
2. EXample : struct tm aTime.
3. aTime.day;
4 aTime.months;
5. aTime.year;

I hope this help.






Linux is the best OS in the world.
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to improve this C++ code to accept spaces in i code_lover C++ Programming 1 July 23rd, 2008 01:42 AM
How to accept inputs from user for encryption? m.ganguli BOOK: Beginning Cryptography with Java 1 March 5th, 2007 03:53 AM
To delete and Accept a row in DataGrid vijay_83 ASP.NET 1.0 and 1.1 Basics 3 September 19th, 2006 02:15 PM
Web Service to accept HTTP-Get jasonfisher .NET Web Services 1 June 9th, 2005 09:31 AM
How to accept apostrophe entered by user karjagis Access ASP 0 April 6th, 2004 06:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.