C++ linker presentation
This commit is contained in:
23
cpplinker/04_static_linking/main.cpp
Normal file
23
cpplinker/04_static_linking/main.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
|
||||
void vec_add(double[3], double[3], double[3]);
|
||||
void vec_print(double[3]);
|
||||
void mat_identity(double[9]);
|
||||
void mat_print(double[9]);
|
||||
|
||||
int main() {
|
||||
double a[3] = {1, 2, 3};
|
||||
double b[3] = {4, 5, 6};
|
||||
double c[3];
|
||||
|
||||
vec_add(a, b, c);
|
||||
std::cout << "vec_add: ";
|
||||
vec_print(c);
|
||||
|
||||
double m[9];
|
||||
mat_identity(m);
|
||||
std::cout << "identity matrix:\n";
|
||||
mat_print(m);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user