+ 1

About adding fuction functions on C++ while making a simple 7 digit calculator .

I want to create a simple calculator ..I am sticking to the problem that how do we add the project fuction while making it .. imagine that I want to sum .I have been written a function for that and then when I threading that fuction to the int main I want that user should rely there own input to that function using cin operator but that can't happen ..please give me some solution.

24th Jul 2018, 6:47 AM
Abhishek kumar
Abhishek kumar - avatar
1 Odpowiedź
+ 3
If you want a fixed input of 7 digits, you can try using getchar() in a loop which adds the retrieved characters to a string which can then be converted to an integer.
24th Jul 2018, 7:55 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar