GITLAB
LeClubInfo
/
FUST
Toggle navigation
Sign in
Sign in
Project
Files
Commits
Network
Graphs
Issues
0
Merge Requests
0
Wiki
Download as
Email Patches
Plain Diff
Browse Code »
Commit
ab4200c63a1b9e7c89b955b250817d32b0ed3821
Authored by
Geoffrey PREUD'HOMME
2016-03-16 13:15:13 +0100
1 parent
aab02c98
Test classe
Showing
4 changed files
with
22 additions
and
2 deletions
Show diff stats
Makefile
src/main.cpp
src/testClasse.cpp
src/testClasse.hpp
Inline
Side-by-side
Makefile
Wrap text
Show/Hide comments
View file @
ab4200c
...
...
@@ -7,7 +7,7 @@ CXX = g++
7
7
main: bin/main
8
8
9
9
# Éxecutables
10
-bin/main: obj/main.o
10
+bin/main: obj/main.o
obj/test.o obj/testClasse.o
11
11
$(CXX) $^ -o $@ $(CXXFLAGS)
12
12
13
13
# Objets
...
...
src/main.cpp
Wrap text
Show/Hide comments
View file @
ab4200c
1
1
/* Programme principal */
2
2
3
3
#include "test.hpp"
4
+#include "testClasse.hpp"
4
5
5
6
int main() {
6
- helloWorld(4);
7
+ Geoffrey frogeye;
8
+ frogeye.setN(42);
9
+ helloWorld(frogeye.getN());
7
10
return 0;
8
11
}
...
...
src/testClasse.cpp
0 → 100644
Wrap text
Show/Hide comments
View file @
ab4200c
...
...
@@ -0,0 +1,9 @@
1
+#include "testClasse.hpp"
2
+
3
+int Geoffrey::getN() {
4
+ return m_n;
5
+}
6
+
7
+void Geoffrey::setN(int n) {
8
+ m_n = n;
9
+}
...
...
src/testClasse.hpp
0 → 100644
Wrap text
Show/Hide comments
View file @
ab4200c
...
...
@@ -0,0 +1,8 @@
1
+class Geoffrey {
2
+ private:
3
+ int m_n;
4
+
5
+ public:
6
+ int getN();
7
+ void setN(int n);
8
+};
...
...