init the repository
This commit is contained in:
commit
ff4a66b3c4
14
Makefile
Normal file
14
Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
CXX := g++
|
||||
FLAGS := -Wall -O3
|
||||
|
||||
SRC := ./src
|
||||
BUILD := ./build
|
||||
|
||||
test.o: $(SRC)/test.cpp
|
||||
-$(CXX) $^ -o $(BUILD)/$@ $(FLAGS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
-rm $(BUILD)/*
|
||||
|
||||
27
src/test.cpp
Normal file
27
src/test.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace::std;
|
||||
|
||||
void print_vector(vector<string> v);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
vector<string> messages;
|
||||
|
||||
messages.push_back("this is a test");
|
||||
messages.push_back("version is 1");
|
||||
|
||||
print_vector(messages);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void print_vector(vector<string> v)
|
||||
{
|
||||
for (size_t i = 0; i < v.size(); ++i)
|
||||
{
|
||||
cout << v[i] << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user