Perhaps something like this:

Code:
#include <iostream>
#include <fstream>

using namespace std;

int main() {
	cout << "Hello, this is a tracker!\n";

	for (int choice {}; choice != 3; ) {
		cout << "\n1. Add costs:\n";
		cout << "2. Show the content of the file:\n";
		cout << "3. Exit \n";
		cout << "\nPlease choose your activity: ";

		switch (cin >> choice; choice) {
			case 1:
				{
					int cost {};

					cout << "Please give me your cost: ";
					cin >> cost;

					cout << "Your cost will be added to your file! \n";

					if (ofstream costfile { "costfiles.csv", ios::app })
						costfile << cost << '\n';
					else
						cout << "Cannot open output file\n";
				}
				break;

			case 2:
				cout << "I'll give you the content, hold on! \n";

				if (ifstream openfile { "costfiles.csv" })
					for (int cost {}; openfile >> cost; cout << cost << '\n');
				else
					cout << "Cannot open input file\n";

				break;

			case 3:
				break;

			default:
				cout << "Invalid option\n";
				break;
		}
	}
}