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 !!!