Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //user-proc.h
- #ifndef USER_PROC_H
- #define USER_PROC_H
- #include <iostream>
- #include <string>
- using namespace std;
- typedef struct UserKnowledge{
- unsigned int id;
- string name,surname,username,password,email;
- }levy;
- void test();
- class cregister{
- private:
- levy user;
- int testp;
- public:
- friend void test();
- cregister(levy &tmp);
- levy getUser();
- void displayUser(levy &);
- };
- #endif // USER_PROC_H
- // user-proc.cpp
- #include <iostream>
- #include <string>
- #include "../include/user-proc.h"
- using namespace std;
- cregister::cregister(levy &tmp)
- {
- this->user = tmp;
- }
- levy cregister::getUser()
- {
- return this->user;
- }
- void cregister::displayUser(levy &user)
- {
- cout << "[INFO] ID : " << user.id << endl;
- cout << "[INFO] Name : " << user.name << endl;
- cout << "[INFO] Surname : " << user.surname << endl;
- cout << "[INFO] Username : " << user.username << endl;
- cout << "[INFO] Password : " << user.password << endl;
- cout << "[INFO] E-Mail : " << user.email << endl;
- }
- void test()
- {
- cout << "test" << endl;
- testp = 50;
- }
- // main.cpp
- #include <iostream>
- #include <string>
- #include "../include/user-proc.h"
- using namespace std;
- int main(){
- test();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement