I have this program, if I run it under Dev-C++ it runs berfect, but if I try to run it under V c++ it gives me an error message.
this is the code
This is the error message:Code://project 5 Order status #include<iostream.h> #include<math.h> float spools_orderd; float spools_in_stock; bool special_c = false; void getData() { char y; cout<<" Please enter the Number of spools orderd: " ; cin>> spools_orderd; cout<<" Please enter the Number of Spools in Stuck: " ; cin>> spools_in_stock; cout<<" IS there any special charge? (Y = yes): "; cin>>y; if ((y= 'Y')|| (y='y')){ special_c = true; } } void display() { float ready_spools_in_stock; float spools_in_back_order; float portion_ready; float total_s_and_h_charge; float total_charge; float special_charges =10; //geting the special charge if there is any if (special_c == true) { cout<<" Please enter the special shipping and handling charges (normaly it is $10) :" ; cin>> special_charges; } //calculating the spools in the order and sub it from the stock if ( spools_in_stock >= spools_orderd) { ready_spools_in_stock= spools_orderd; spools_in_stock = spools_in_stock - spools_orderd; spools_in_back_order = 0; }else { ready_spools_in_stock = spools_in_stock; spools_in_back_order = spools_orderd - spools_in_stock; spools_in_stock = 0; } //calculating the portion ready to ship. portion_ready = ready_spools_in_stock * 100; //calculating the shipping & handling charges total_s_and_h_charge = special_charges * ready_spools_in_stock; //calculating the total order ready to ship total_charge = total_s_and_h_charge + portion_ready; //displaying the resluts. cout<< " The Number of spools ready to ship in stock are: "; cout<< ready_spools_in_stock<< "spools"<<endl; cout<<" The Number of spools on back-order is:"; cout<< spools_in_back_order<< endl; cout<<" Subtotal of the portion ready to ship : $ "; cout<< portion_ready<<endl; cout<< " The total shipping and handling charges on the portion ready to ship $"; cout<< total_s_and_h_charge<<endl; cout<<" The total of the order ready to ship is : $ "; cout<< total_charge<<endl; } int main() { getData(); display(); return 0; }
*******
--------------------Configuration: p4 - Win32 Debug--------------------
Compiling...
4p4.cpp
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/p4.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
p4.exe - 2 error(s), 0 warning(s)
**********************
Thank you for your help.



LinkBack URL
About LinkBacks


