Hello, and welcome...
I have a small question about class functions.
Before anythig to understand my problem, when I have this file "test.h" which contains:
#ifndef TEST_H
#define TEST_H
class aFile
{
private:
char *src;
char *dst;
public:
void Copy(char *src, char *dst);
};
#endif//TEST_H
Also I've another file undername "test.cpp" contains:
#include <stdio.h>
#include "test.h"
void aFile::Copy(char *src, char *dst)
{int writer;
FILE *FILE_in,
*FILE_out;
FILE_in = fopen(src,"rb");
FILE_out = fopen(dst,"wb");
while(1){
writer=getc(FILE_in);
if(writer!=EOF)fprintf(FILE_out,"%c",writer);
else break;
}
fclose(FILE_in);
fclose(FILE_out);
}
Finally, main file to executes last files with name "main.cpp" contains:
#include "test.h"
void main(void)
{
aFile File;
File.Copy("c:\\Document.txt","d:\\Document.ini");
}
when I "Compile" or "Make all" all these files there's
prolem message says:
Info :Linking D:\main.exe
Error: Error: Unresolved external 'aFile::Copy(char*,char*) __stdcall' referenced from D:\MAIN.OBJ
My question is, what's a problem?