merging
This commit is contained in:
@@ -14,7 +14,7 @@ all: $(EXECUTABLE) $(SOURCES)
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(CC) $(LFLAGS) -o $@ $(OBJECTS)
|
||||
|
||||
-include * .d
|
||||
-include *.d
|
||||
|
||||
%.o:%.cpp
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
16
Lecture/Week2/main.cpp
Normal file
16
Lecture/Week2/main.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int & multiply(int A, int B) {
|
||||
int i = A*B;
|
||||
return i;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int A = 5;
|
||||
int B = 3;
|
||||
int C = multiply(A,B);
|
||||
cout << "A: " << A << " B: " << B << " C: " << C << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
15
Lecture/Week2/main2.cpp
Normal file
15
Lecture/Week2/main2.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
// int length;
|
||||
// cin >> length;
|
||||
int array1[3] = {3, 10, 40};
|
||||
cout << array1 << endl;
|
||||
cout << *array1 << endl;
|
||||
cout << array1 << endl;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user