Okay, I have another problem that I can't figure out and it has to do with the I/O file stuff.
This is the problem:
Write a function, CountElement, that receives two arguments: a 2-dimensional char array
and the size of the array. This function counts the number of digits, small letters, capital letters and
symbols in the char array, and returns the counts. Write a driver function to test your function and
print your results to the computer screen and to a text file.
This is my attempt but I am not even sure if I am doing this correctly:
#include <iostream>//include statement(s)
#include <iomanip>
#include <fstream>
#include <string>
#include <cmath>
using namespace std;//using namespace statement(s)
const int i = 1000;
void createArray(int a[][1000]);
void CountElement(char a[][1000]);
void printResults(char c[][1000]);
int main()
{
int a[i][i] = {0};
createArray(a);
system ("PAUSE");//black box to appear
return 0;//return statment(s)
}
void createArray(char a[][1000])
{
int counter = 0;
for (int i = 0; i < 1000; i++)
{
for (int j = 0; j < 1000; j++)
{
a[i][j] = counter++;//initalize the element for the array
}
}
return;
}
void CountElement(char a[][1000])
{
return;
}
void printResults(char c[][1000])
{
return;
}
I really need help with this one because I have no idea what I am doing with this code. Thanks a bunch!