int intMonth, intDay, intYear
The user will input 3 integers (month day year: 7 10 81)
To Capture the input from the buffer, I have:
My question is, can the three integers entered be assigned to the corresponding variable names?
it depends on a crucial fatcor: does the string have blanks that separate between the numbers? If so, you can read from the string a word (a token) using the overloaded >> operator and teh stringstream objects. I think that it would be simpler for you to read the values as three strings, though.
Danny, thanks for your response. I will go with the advise of three strings.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL