OK, so I am in my 1st semester of C++. I have already finished my 1st assignment (below), a Windows32 Console Application and it works just fine. However, if I write the program as a Windows Forms Application with a GUI, then I can earn extra credit. My problem is that I can't seen to output the assignment to a label. I have created the GUI, but only being in my 1st week of class, I am unaware how to output the same info that the Console Application displays in a label box in the GUI in a Windows Form. I need to display the following 4 items. Any help would be greatly appreciated!

// Restaurant Bill.cpp : Diplays the meal cost, tax amount, tip amount, and total bill on the screen
//

#include "stdafx.h"


#include <iostream>
using namespace std;


int main()
{
	double meal = 44.50;
	double tax = meal * 0.0675;
	double subtotal = meal + tax;
	double tip = subtotal * 0.15;
	double total = subtotal + tip;

	cout <<"Meal cost: " << meal << endl;
	cout <<"Tax Amount: " << tax << endl;
	cout <<"Tip Amount: " << tip << endl;
	cout <<"Total: " << total << endl;

	return 0;
}

You will have to create a project to convert it. Making a project is simple and since its a small app, there wont be much of a trouble.....you can choose the windows option when you start to make the project. All the best.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.