Switch to full style
C++ code examples
Post a reply

C++ Code Visual Basics.net 2003

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



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