Total members 11893 |It is currently Tue Nov 05, 2024 7:44 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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;
}




Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : C++ Code Visual Basics.net 2003
 basics     -  
 JNI Basics lesson 1     -  
 Html basics tutorials.     -  
 Matlab basics examples     -  
 FTP WITH WINDOWS SERVER 2003     -  
 Fax Services Access in Windows Server 2003     -  
 visual c++ MFC background threads     -  
 movie database in Visual Studio     -  
 Visual Studio 2008 C# project! help!!     -  
 Learn ASP.NET,Visual basic 2005,08     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
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