tentative debut de code avec class ne fonctionne pas

This commit is contained in:
Hugo LAMY
2022-02-02 17:02:43 +01:00
parent 80384d5f93
commit fd2dd5fa20
9 changed files with 51 additions and 2 deletions

View File

@@ -16,10 +16,11 @@ LIBS =
INCLUDES = -I$(D_HEADERS)
D_HEADERS = .
HEADERS =
HEADERS = Phonebook.class.hpp
D_SRCS = .
SRCS = megaphone.cpp
SRCS = Phonebook.cpp \
Phonebook.class.cpp
D_OBJS = builds
OBJS = $(SRCS:%.cpp=$(D_OBJS)/%.o)

View File

@@ -0,0 +1,18 @@
//#include <string>
//#include <iomanip>
#include <iostream>
#include "Phonebook.class.hpp"
Phonebook::Phonebook( void ) {
std::cout << "hello" << std::endl;
return;
}
Phonebook::~Phonebook( void ) {
std::cout << "good bye" << std::endl;
return;
}

View File

@@ -0,0 +1,13 @@
#ifndef PHONEBOOK_CLASS_HPP
# define PHONEBOOK_CLASS_HPP
class Phonebookk {
public:
~Phonebookk( void );
Phonebookk( void );
};
#endif

8
d00/ex01/Phonebook.cpp Normal file
View File

@@ -0,0 +1,8 @@
#include "Phonebook.class.cpp"
int main() {
Phonebookk yellow;
return 0;
}

Binary file not shown.

BIN
d00/ex01/builds/Phonebook.o Normal file

Binary file not shown.

9
d00/ex01/main.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include "Sample.class.cpp"
int main() {
Sample instance;
return 0;
}

View File

View File