Sep 16, 2013 at 11:22pm UTC
Dear citizens of the world,
Question: How can we write functions to access various fields?
Example: A phone number -- it has an area code, exchange & subscriber -> (123)-456-7890
How can we write a function to access the various fields of a phone number both in a particular class & in the main?
Sep 17, 2013 at 10:12am UTC
this is extremely vague. 'How' depends on what you want to accomplish.
Usually you use struct /class
and arrays for this.
Or do you mean parsing a string?
Sep 17, 2013 at 1:19pm UTC
Fran dont comment, if your not helping.
@Zombie go.
Coder777 answered, Usually you use struct/class.
Sep 17, 2013 at 2:10pm UTC
Luke, your comment isn't particularly constructive either. You don't need to police anyone, particularly a first time poster who hasn't done anything egregiously wrong.
Sep 17, 2013 at 3:03pm UTC
Actually, the "first time poster" is a spambot, and its message has been nuked from orbit :)
Sep 17, 2013 at 10:06pm UTC
Coder777 -- Figured to create a class. Thanks! :)