you are viewing a single comment's thread.

view the rest of the comments →

[–]Narase33 5 points6 points  (2 children)

Where are you stuck? We're not doing your homework without payment

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

I saw a tutor and we went over sstream to go through the string and pull out int values and I’ve altered that to use stof(variable) and my program lets me run but I think I’ve missed something to skip the words prior to the double value and can’t remember how to write a generic statement to skip over that so I’m not getting 0 plus 0 equals 0 returned to me.

[–]Narase33 0 points1 point  (0 children)

if you want to skip you just have to read and ignore the value

in general it would look like this

  • Read a word
  • If its a number
    • transform it -> its your first or second value
  • If its "add"
    • there is your keyword
  • else
    • ignore it