No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Here's the code: [code] #include <iostream> #include <fstream> #include <iomanip> using namespace std; const int MAX_EMPLOYEE = 500; enum PayType{H, S}; struct EMPLOYEE { int idNumber; char name[21]; double payRate; short int numberDependents; enum PayType; }; int LoadMaster(EMPLOYEE& record); int main(){ int count; EMPLOYEE record; count = LoadMaster(record); cout << … |
|
I'm having a lot of difficulty trying to figure out how to label headings in a 2D array using enum type. Here is the basic for-loops to read in and out the values of an array. (This is a 5x5 array). [CODE] #include <iostream> #include <fstream> #include <iomanip> #include <cstring> … |
|
Here's my code: [CODE=language]include <iostream> #include <iomanip> #include <fstream> using namespace std; int main(){ int ID; double largest; double secondLargest; double sales; int largestCount = 0; int secondLargestCount = 0; ifstream infile ("sales3.txt"); if (!infile){ cout << "Error: cannot find input data!\n"; return 1; } cout << " Acme Sales … |
|
Re:
This is a very simple app I am trying to do. How else would sum up the total of the number the user entered? Example if the user enters 10, the loop will find the sum of 1,2,3,4,5.....10. Here is my code and I spent few hours on to come … |
|
This is what the code looks like. It's a simple program to determine which years are leap years, and which aren't. I'm having trouble ending the program if the user types ctrl-z. Any help would be appreciated. I know it's probably something simple, but I can't figure it out. :( … |