Hi,
Can you please help with this..
I need to develop a program that involves two classes: FileHandling and DataProcessing.
I have developed header files and implementation for both classes i.e. *.h and *.cpp
Now, in my main program I have created an object of each class and I want to use these objects to access the functions of these classes.
so my codes look something like this:
#includ "FileHandling.h"
#include "DataProcessing.h"
int main()
{
FileHandling file;
DataProcessing dp;
file.readfile();
return 0;
}
However, when I try to compile the main program, it gives me the following error about the called functions
" In function 'main': undefined reference to 'FileHandling::readfile()' collect2: ld returned 1 exit status"
I have all the files in one directory and I am working on Unix.
I use the following command to compile the program, where path is the location of the directory,:
g++ -Wall -Lpath -o Main Main.cpp
can you please help with? I have no clue what does this error mean
Thanks