
-----------------------------------
Junaid2pac
Thu Apr 12, 2007 3:58 pm

Multilple/Function
-----------------------------------
I have just basically started learning c++ and have come to a chapter on multiple files and when i run the program it gives me the following error:

SVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Junaid C\C++\Multiple Files 2\Real Test\Debug\Real Test.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Junaid C\C++\Multiple Files 2\Real Test\Debug\BuildLog.htm"
Real Test - 2 error(s), 0 warning(s)

i put this in header:

double Square (double x);
double Cube (double x);
---------------------------------
The function file:
---------------------------------
#include "stdafx.h"


double Square (double value)
{
	double squareReturn;
	squareReturn = value * value;
	return squareReturn;
}

double Cube(double value)
{
	double cubeReturn;
	cubeReturn = value * value * value;
	return cubeReturn;
}

--------------------------
And then a little Test:
--------------------------

#include "stdafx.h"
#include 

using namespace std;

int Main (void)
{
	double num = 5;
	double ans;

	ans = Square(num);
	cout 