Expand|Select|Wrap|Line Numbers
- void addition::print_output()
- {
- cout << "Enter value : ";
- getline(cin,store);
- }
here my problem,
for e.g : if user enter value like this
123,456,789,764,345 or 123456789764345
then i would like to convert to this for e.g :
block[0] = 345
block[1] = 764
block[2] = 789
block[3] = 456
block[4] = 123
i just don't know how to start write this function.
-----------------------------------------------------------------------
my private in class :
Expand|Select|Wrap|Line Numbers
- private:
- string store;
- int block[];
Expand|Select|Wrap|Line Numbers
- int addition::manipulate()
- {
- // i guess it would involve if..else and for loop.
- }
i just need an example.. :(
please help.
thank you.