Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <conio.h>
- #include <string>
- using namespace std;
- class User
- {
- public:
- static int UserNumber;
- string Pass , Name ;
- };
- int User::UserNumber = 0;
- void Setup(User Users[]);
- void selectMenu(int NumberUsers,User Users[]);
- void Show();
- void Add();
- void Setup(User Users[])
- {
- User Admin;
- Admin.Name = "Admin";
- Admin.Pass = "Galixon0103";
- Admin.UserNumber = 1;
- }
- void Show(User Users[])
- {
- User ToLoop;
- cout<<"ID\tNazwa"<<endl;
- for(int i = 0;i < ToLoop.UserNumber; i++)
- {
- string text = Users[i].Name;
- cout<<text;
- }
- }
- int main()
- {
- User ToRef;
- User Users[ToRef.UserNumber];
- Setup(Users);
- selectMenu(ToRef.UserNumber,Users);
- return 0;
- }
- void selectMenu(int NumberUsers,User Users[])
- {
- Show(Users);
- User ToRef;
- char wybor;
- cout<<"\n\nWybierz akcje: \n0 - Dodaj Uzytkownika\n1 - Wybierz Uzytkownika\n2 - Usun Uzytkownika\n3 - wyjdz\n\t";
- wybor = getch();
- if(static_cast<int>(wybor) >= 48 && static_cast<int>(wybor) <= 51)
- {
- switch((static_cast<int>(wybor)))
- {
- case(51):
- exit(1);
- case(50):
- system("CLS");
- selectMenu(ToRef.UserNumber,Users);
- }
- }
- }
- void Add()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement