Merge branch 'develop'
This commit is contained in:
Julian LECLERC 2022-03-30 11:10:24 +02:00
commit ad28b9e545
7 changed files with 31 additions and 0 deletions

BIN
a.out Executable file

Binary file not shown.

7
arithmetic.cpp Normal file
View File

@ -0,0 +1,7 @@
#include "arithmetic.h"
int add(int a, int b)
{
int c = a+b;
return c;
}

2
arithmetic.h Normal file
View File

@ -0,0 +1,2 @@
int add(int,int);

BIN
arithmetic.o Normal file

Binary file not shown.

10
main.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <iostream>
#include "arithmetic.h"
int main()
{
std::cout<<"Hello world!"<<std::endl;
std::cout<<"c="<<add(1,2)<<std::endl;
return 0;
}

BIN
main.o Normal file

Binary file not shown.

12
makefile.txt Normal file
View File

@ -0,0 +1,12 @@
all: main arithmetic
g++ main.o arithmetic.o
main: main.cpp
g++ -c main.cpp
arithmetic: arithmetic.cpp arithmetic.h
g++ -c arithmetic.cpp
clean:
rm*.o
rm a.out