I do not know what the problem is or how to fix it.I am working in Visual Studio C++ 2010 Express
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
// hk.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double cost = 0;
double tax = 0;
double tip = 0;
double total = 0;
cout <<"please enter the cost of your meal: ";
cin >> cost;
tax = cost * 0.07;
tip = cost * 0.18;
total = cost + tax + tip;
cout << setprecision(2) << fixed;
cout <<"\n\nThe cost of your meal is: " << cost << "\n";
cout <<"\n\nThe tax amount is: " << tax << "\n";
cout <<"\n\nThe tip amount is: " << tip << "\n";
cout <<"\n\nThe total cost is: " << total << "\n";
return 0;
}
|
ERROR: 1>------ Build started: Project: hk, Configuration: Debug Win32 ------
1> hk.cpp
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Last edited on
Last edited on