phonebook class contact fonction print fonctionne
This commit is contained in:
53
d00/ex01/Contact.class.cpp
Normal file
53
d00/ex01/Contact.class.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "Contact.class.hpp"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
Contact::Contact( void ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Contact::~Contact( void ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void Contact::add_index( std::string str ) {
|
||||
|
||||
this->index.assign(str);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void Contact::add_first( std::string str ) {
|
||||
|
||||
this->first.assign(str);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void Contact::add_last( std::string str ) {
|
||||
|
||||
this->last.assign(str);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void Contact::add_nick( std::string str ) {
|
||||
|
||||
this->nick.assign(str);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void Contact::print_contact( void ) {
|
||||
|
||||
std::cout << "INDEX : " << this->index << std::endl;
|
||||
std::cout << "FIRST NAME : " << this->first << std::endl;
|
||||
std::cout << "LAST NAME : " << this->last << std::endl;
|
||||
std::cout << "NICKNAME : " << this->nick << std::endl;
|
||||
return;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user