Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize Information Management system based on C++

Shulou Source: shulou.com Published: 2022-06-01 04:57:57 09月19日 Update

The knowledge points of this article "how to implement an information management system based on C++" are not quite understood by most people, so the editor summarizes the following, with detailed contents and clear steps, which can be used for reference. I hope you can get something after reading this article. Let's take a look at this "how to implement an information management system based on C++" article.

1. Use class + function to implement

2. Use vector of STL container

3. File storage mode of fstream

4. Read in and write out xls files

5. Add, delete, modify and check the four major functions of the data

6. Certain input fault tolerance

# include # define Num 20#define FALSE 0#define TRUE 1#define PATH ". / file.xls" using namespace std;class LiangshanHeros {public: char name [Num]; / / Liangshan hero's name int age; / / age char loc [Num]; / / place of origin double bounty; / / reward public: LiangshanHeros () {age = 18; bounty = 6666 } LiangshanHeros (char* _ name, int _ age, char* _ loc, double the_bounty) {strcpy (name, _ name); age = _ age; strcpy (loc, _ loc); bounty = the_bounty;} ~ LiangshanHeros () {} public: char* getName (); char* getLoc (); double getBounty (); int getAge () Public: int setName (char*); int setAge (int); int setLoc (char*); int setprice (double); public: void showMenu ();}; class params: public LiangshanHeros {public: params () {} ~ params () {} public: void InitSet (); void showMensu ();}; char* LiangshanHeros::getName () {return name;} char* LiangshanHeros::getLoc () {return loc } double LiangshanHeros::getBounty () {return bounty;} int LiangshanHeros::getAge () {return age;} int LiangshanHeros::setName (char* _ name) {if (strlen (_ name) > 20 | | strlen (_ name) < 2) {cout

Tags: Input hero Liangshan success name age place of origin content data bounty file information management system system Caterpillar management name size article knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology NVidia Huawei Redmi