undefined reference to 'initialArray(int *)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <iomanip>
using namespace std;

void initialArray( int * );
void characterCount( char, int *);

int main()
{

    char letter;
    int letterCount[25];

    initialArray( letterCount );

    ifstream inFile( "textinput.txt", ios::in );
    ofstream outFile( "textoutput.txt" , ios::out);

    if ( !inFile || !outFile)
    {
        cerr << " One of the two files could not be openned to read or write" << endl;
        exit(1);
    }

    while( inFile >> letter )
        characterCount( letter, letterCount );

}

void intialArray( int *letterCountPtr )
{
    for(int j = 0; j < 26; j++)
    letterCountPtr[j] = 0;
}


I have not included all the code, but the section I am having problems with. Thank you for all the help.
Last edited on
1
2
3
void initialArray( int * );
...
void intialArray( int *letterCountPtr )


initialArray is not the same as intialArray. Spelling error.
Last edited on
Thanks. I was up until 3 am and thought I respelled it like 20 time to finally realize that stupid mistake.
Topic archived. No new replies allowed.