I want to read one number from the console and then read in an arbitrary list of numbers from a txt file and then print how many times the console number occurs in the file. I want to assume that the last number in the file is 0.
This is what I have so far but I feel its incorrect, ive spent 6 hours on this and am totally stuck. I can read the file but am unsure of how to input a number into the console, read the file and then output how many times that number appears :(
#include <fstream>
#include <iostream>
#include <iomanip>
using std::cout;
using std::endl;