| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Beginner question.
I have an assignment for school and have been wondering.
The assignment states it wants us to take input like: please enter a command:a(5,3) please enter a command:a(3,11) please enter a command:a(7,22) What do i do to get it to look at both the letter as the command and the letters inside of the brackets only for a formulate that the command a does? |
|
#2
|
|||
|
|||
|
You'll have to take the input as a string and then parse it yourself, checking for which function (if there is more than just 'a'), then making sure there is a '(' (and print an error if there isn't), then converting the numbers to integers.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Beginner question. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|