Total members 9951 | Gratitudes |It is currently Sat Feb 11, 2012 10:32 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Code Snippet
 Code subject: C++ Code Visual Basics.net 2003
PostPosted: Thu May 07, 2009 11:42 pm 
Offline
Newbie
User avatar

Joined: Wed May 06, 2009 1:25 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time

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


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 java project code  Java  Anonymous  0
 Read your gmail using Java code  Java examples  msi_333  5
 What's wrong with my code?  Java  Anonymous  3
 project source code in java  Java  Anonymous  0
 Ajax Source code to Suggest application with JSP Server side  AJAX  msi_333  5

All times are UTC [ DST ]


Users browsing similar codes

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Code Snippet | Next Code Snippet 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team