Errors with fstream and arrays

Im getting these errors

1>Source.obj : error LNK2019: unresolved external symbol "void __cdecl readInfo(int * const,double (* const)[12])" (?readInfo@@YAXQAHQAY0M@N@Z) referenced in function _main

1>Source.obj : error LNK2019: unresolved external symbol "void __cdecl printInfo(int * const,double (* const)[12])" (?printInfo@@YAXQAHQAY0M@N@Z) referenced in function _main

Im trying to read data from a file into an array, and i think that my prototypes or calls are where my problems are coming from, but i cant find it.
1
2
3
4
5
6
7
8
9
//prototypes
void readInfo(int arrayOne[], double arrayTwo[][COUNT]);

void printInfo(int arrayOne[], double arrayTwo[][COUNT]);

//calls
readInfo(arrayOne, arrayTwo);
printInfo(arrayOne, arrayTwo);

arrays are defined in the main()

If you need more part of the code to tell where the problem is i can provide it, but id rather show as little code as possible to protect my work.
Last edited on
Are the calls from within the main function? Please provide more code.
Yes, the calls are within the main function.

1
2
3
//Defining arrays (within main)
int arrayOne[COUNT_TWO];
double arrayTwo[COUNT_TWO][COUNT];


My prototypes are defined outside the main.
1
2
3
4
//definitions
void readInfo(int arrayOne[], double arrayTwo[][COUNT])

void printInfo(int arrayOne[], double arrayTwo[][COUNT])


Last edited on
Topic archived. No new replies allowed.