I need help with my C++ homework and im stuck. The problem is to write a program that reads a file of all lowercase and output each letter and how many times each letter occurs.... Here is the code i have and where i am stuck....
#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#inlcude <fstream>
using namespace std;
int main()
{
ofstream infile;
ifstream outfile;
int count [0] = {0};
char letter [26] = {' '};
char next;
int next_location;
infile.open("inputfile.txt");
if(in_file.fail())
{
cout << "Input file did not open please fix. \n";
system("pause");
exit(1);
}
infile >> next;
for(