Thu May 07, 2009 11:42 pm
I’m having trouble with my compiling my program. I get the following errors:
FerreteriaIII error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
FerreteriaIII fatal error LNK1120: 1 unresolved externals
Can someone please help me.
Luis
// Proyecto Final.
// Ferreteria - Proceso de Ventas.
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
//Function prototype
double calcTotal(double,double, double, double, double);
int _main()
{
//-- Declare Variables --
// We set the prices for each item and the taxes
double paila = 24.0;
double loza = 12.0;
double taxes = 0.07; // check data type decimal spaces
char stop = ' ';
// Input (Variables that will hold what the cashier enters)
// We set them to zero just as a default value
double pailaCantidad = 0;
double lozaCantidad = 0;
// Output (What the cashier will recieve)
//
double subTotal = 0.0;
double total = 0.0;
//-- What to prompt the cashier with --
// Input variables
Console::Write("Entre la cantidad de Pailas : ");
pailaCantidad = Convert::ToInt32(Console::ReadLine());
Console::Write("Entre la cantidad de Loza : ");
lozaCantidad = Convert::ToInt32(Console::ReadLine());
//-- Do the math according to what the cashier entered --
// Calculations (Adding items together in the function called)
total = calcTotal(pailaCantidad, lozaCantidad, paila, loza, taxes);
//-- Return results to the cashier --
// show payment amounts
Console::WriteLine("Subtotal : $", Convert::ToString(subTotal));
Console::WriteLine("Total : $", Convert::ToString(total));
// stop program
stop = Console::Read();
return 0;
}// end main program
//**************function definitions ***********
double calcTotal(double pCantidad, double lCantidad, double pPrice, double lPrice, double tTax)
{
double holdSub = 0;
double holdTot = 0;
holdSub = (pCantidad * pPrice) + (lCantidad * lPrice);
holdTot = holdSub + (holdSub * tTax);
return holdTot;
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.