Trying to learn functions and having some problems. I create a function in a header file and then call this function from another program and I receive the error C3861: Identifier not found. How do I call a function in another file?
Test.h \\header file
class Test
{
public:
Test(void);
int publicNumber;
void addEntry(int xNumber);
};
\\ code from Test.cpp file
void Test::addEntry(int xNumber)
{
int nNumber = 0;
nNumber = xNumber;
cout <<"passed number is " << nNumber;
}
\\ Test1.cpp
#include "Test.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int iNumber = 0;
cout <<"Enter a number ";
cin >>iNumber;
Test::addEntry(iNumber);