0
   

Microsoft Visual C++ 2008 Express Edition

 
 
Reply Fri 15 Oct, 2010 12:30 pm
This is suppose to be a program to prompt someone to calculate their commission. This is what I have:

#include <iostream>
using namespace std;
int main(){
double commission, rate, week1, week2, returns;

cout << "enter commission rate";
cin >> rate;
cout << "enter week 1 earnings";
cin >> week1;
cout << "enter week 2 earnings";
cin >> week2;

commission = rate * (week1 + week2 - returns);

system "pause";
return 0;

}

The errors that I have are:

error C2143: syntax error : missing ';' before 'string'

and

warning C4551: function call missing argument list
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,401 • Replies: 1
No top replies

 
George
 
  1  
Reply Fri 15 Oct, 2010 01:17 pm
@Random5185,
I haven't doe this a long while but . . .

Just off the top of my head, shouldn't the arguments to the system call be
in parentheses?

The variable returns is not initialized.

0 Replies
 
 

Related Topics

 
  1. Forums
  2. » Microsoft Visual C++ 2008 Express Edition
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/18/2024 at 07:33:23