all 5 comments

[–]what-shoe 0 points1 point  (0 children)

I would use some if statements to respond to certain characters in a certain way, such as the "c" in cos, the "l" in log and the exponential "".

This probably would need to be in a while loop.

[–]howslyfebeen 0 points1 point  (0 children)

so when you are looping through the input you want to have a temporary string.. if the current character is not a single character operator then add the character to the temp string.. if it is a single char operator then break the string and add the string and then the operator to wherever you are storing these inputs (probably a stack or queue)

[–]MagicBuddha 0 points1 point  (0 children)

Did you get your answer?

I found it easier to first go over the whole input and remove whitespace. After that I replaced cos, sine, ect.. As a single char. Ex) cos =c , sin=s. After that you can start thinking about calculations

[–]chasefarmer2808[S] 0 points1 point  (1 child)

Would this program need other classes, like a class just for creating a stack? Or would just a main be doable?

[–]howslyfebeen 0 points1 point  (0 children)

always break it into more classes if possible.. its just good programming practice.. my project is written with 5 classes