By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,395 Members | 2,537 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,395 IT Pros & Developers. It's quick & easy.

Please help a newbie to Visual C++...

P: 2
Alright, honestly ive been programming for about 1 year within the last 4 or 5 years so im not helpless!!!
Ive never been able to get a good c++ compiler until now!!! I just got microsoft visual c++, and am having troubles.
Im on the first tutorial and this is the gist of it.

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''
#include <iostream>
using namespace std;

int main()
int apples, oranges; // Declare two integer variables
int fruit; // ...then another one

apples = 5; oranges = 6; // Set initial values
fruit = apples + oranges; // Get the total fruit

cout << endl; // Start output on a new line
cout << "Oranges are not the only fruit... " << endl
<< "- and we have " << fruit << " fruits in all.";
cout << endl; // Start output on a new line

return 0; // Exit the program
'''''''''''''''''''''''''''''''''''''''''''''''''' ''
it says there are no errors or anything, but a global file DOES NOT appear when i add the text to a source file!!!

Now, it says to add this to the source file which i do and it says when you do that a globals icon will appear in the CLASS VIEW, but it doesnt. So i cant run this simple program... It looks simple to me and everything is right , maybe im forgetting something that should be enabled or something. I dont know anything abou this can n e 1 help... i promise ill stop posting if someone can help me.... till then i will be looking around to solve my problem.. I am not hopeless...

This is weird Please Please help....

thank you..
Sep 9 '05 #1
Share this Question
Share on Google+
1 Reply

P: 2
In this exercise,you create a program that displays the registration information for programing seminars. The price per person depends on the number of people a company registers. ( For example , if a company registers four people, then the amount owned by that company is 400.) The following table shows the charges per registrants.

Number of registrants Charge per person ($)
1-3 150
4-9 100
10 or more 90

create an IPO chart for the problem and code the program.Use a while loop to allow the user to enter the number of people a company registers. The program should allow the user to enter the number registered for as many companies as desired.Be sure to use sentinel value. The program should disply the total number of people registered, the total charge, and the average charge per registrants.(For example, if one company registers 4 people and a second compay registers 2 people, then the total number of people registered is 6, the total charge is 700, and the average charge per registrants is $116.67)
Oct 19 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.