Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 17th, 2007, 10:30 PM
Registered User
 
Join Date: Oct 2007
Location: , , .
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
Location: Seri Kembangan, Selangor, Malaysia.
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 02: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



All times are GMT -4. The time now is 06:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.