Im doing this calulator app and I have a little problem with the parser..
the main function is calling the parser for each char entered..
when I was using cin.get(ch) everything was going perfectly...
But Now im trying to use istringstream instead.
But it keeps pointing at the same char?
why cin.getr will go to next char but ist.get(ch) wont?
Here is the stream that I use:
Or d/l the full code :
This worked corretly for me:
istringstream ist("Whats up dog!");
cout << ch;
yeah that will work but since I call the function from main for each char it seems to forget where it was pointing at last time which didnt happen when I was using cin.get(ch)
The first question we ask in a code review is "Does your code compile?" It doesn't for me - the code you posted anyways.
sorry was doing some test when I posted it and forgot some in it now its all right if u d/l again
Or just remove * before ist..
istringstream *ist(temp_string); // Oops!!
BTW: try to forget all the cout included... I used them for debugging..
I changed the attachement to remove them..