Four-week project 4 extension 4 organize project 4 with multiple files ** 100th

Source: Internet
Author: User

Main Function

#include 
 
  #include "header.h"using namespace std;int main(){    Salary s;    s.set_salarys();    s.add_salarys (500);    s.sort_salarys();    s.show_salarys();    return 0;}
 


Head. cpp Function

# Include
 
  
# Include "header. h" using namespace std; void Salary: set_salarys () {int x, I = 0; cout <"Enter employee Salary:" <
  
   
> X; while (x> 0) {salarys [I] = x; ++ I; cin> x;} number = I;} void Salary :: add_salarys (int x) {int I; for (I = 0; I
   
    


Head. h function

# Ifndef HEADER_H_INCLUDED # define HEADER_H_INCLUDEDclass Salary {public: void set_salarys (); // (1) void add_salarys (int x); // (2) void sort_salarys (); // (3) void show_salarys (); // (4) private: double salarys [50]; // wage int number; // actual number of people}; # endif // HEADER_H_INCLUDED


Sentiment: Article 100th has crossed a new stage, and Haha is also a hundred people. Continue to work hard !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.