This assignment was due last Friday. I am supposed to read a set of numbers from a file. The numbers have $'s and ,'s, I need to take them out to get the sum of the numbers. Extra Credit: If I can calculate the sum exactly and put the $'s and ,'s back in. This is what I have so far:
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main(){
string money;
ifstream fin;
fin.open("file.txt");
if(!fin){
cout<<"Could not open file. Shutting down...";
return 0;
}