Bloodshed dev c++, recieved 1 error on line 24 (return 0), here is the error....

Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Dev-Cpp\payroll.cpp" -o "C:\Dev-Cpp\payroll.exe" -g3 -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3
C:\Dev-Cpp\payroll.cpp: In function `int main()':
C:\Dev-Cpp\payroll.cpp:24: error: expected `;' before "return"

here is input........

Execution terminated

#include <iostream>
using namespace std;
int main() {
int employeeid;
int hoursworked;
float hourlyrate, grosspay, taxamount, netpay;
float const TAXRATE = 0.10;
cout << "Enter The Employee ID: ";
cin >> employeeid;
cout << "Enter The Hours Worked: ";
cin >> hoursworked;
cout << "Enter The Hourly Rate: ";
cin >> hourlyrate;
grosspay = hoursworked * hourlyrate;
taxamount = grosspay * TAXRATE;
netpay = grosspay - taxamount;
cout << "EMPLOYEE ID IS " << employeeid << endl;
cout << "THE HOURS WORKED ARE " << hoursworked << endl;
cout << "THE HOURLY RATE IS " << hourlyrate << endl;
cout << "THE GROSSPAY IS " << grosspay << endl;
cout << "THE TAXAMOUNT IS " << taxamount << endl;
cout << "THE NETPAY IS " << netpay << endl;
return 0;

Look at that error message. The answer is starring you in the face.

Take a close look at the following line:
C:\Dev-Cpp\payroll.cpp:24: error: expected `;' before "return"

This should solve all of your problems

> system("pause")
Where's the missing ; here?

Why isn't this code a reply to your other thread containing the same code, which I've just wasted my time responding to :icon_mad:

This article has been dead for over six months. Start a new discussion instead.