// preprocessor directives----
#include <iostream> // for program input & output
#include <string> // for string class data
#include <iomanip> // for formatting output
using namespace std;
/* Function: main() *************************************************
*
* application entry point
*/
int main()
{
/* declarations ***********************************************
declare program data
*/
string name; // contributor's name
int targetContribution; // target contribution amount to the dollar
int actualContribution; // actual contribution amount made to the dollar
int difference; // calculated difference of the target and actual contributions
/* statements *************************************************
code program instructions: will ask for contribution target and actual amount. Will take the
difference of the target and actual amount and display it.
*/
cout << "Enter actual contribution: "; //ask for actual contribution
cin >> actualContribution;
//
// Step #2: processing
//
difference = targetContribution - actualContribution; // calculate the difference between actual contribution
// and assign the number to difference
//
// Step #3: output
//
// display the report column headings
// format & print column heading row
// display the report detail line
// 1 - format & display user name
cout << left; // justification
cout << setw(10); // width for column data
cout << name; // name of contributor
// 2 - format & display target contribution
cout << right; // justification
cout << setw(6); // width for column data
cout << targetContribution; // target contribution amount
// 3 - format & display actual contribution
cout << right; // justification
cout << setw(10); // width for column data
cout << actualContribution; // target contribution amount
// 4 - format & display difference
// note: positive number means target met
cout << right; // justification
cout << setw(14); // width for column data
cout << difference; // target contribution amount
// see if the user wants to continue or to exit the program
that's usually because you choose the wrong project type.
So you need to create a new project where you need to make sure that it is actually a console project
You don't really need to start a new project. Just go to project settings, linker settings, then system and change subsystem to "not set". It will link based on which entry point function you have defined.