Replace input style (cin to array)
Posted on 2006-11-25
I got a code (calculate math expression) from a website and I want to use it in my program.
Part of the code:
cout << "Don't forget add ';' to the tail of the expression:)" <<endl;
cin >> temp;
cin >> number[ntop++];
cout << "And the answer is... " << number <<endl;
In my program I already have an expression (char array) so I don't want to use the "cin" commands (especialy cin.putback) to deal with the expression..
I want to use my array or maybe put the string into cin streaming function(if possible) so I'll can use this code..
Thanks for your help.