Skip to content

Commit a8962b1

Browse files
committed
Update Gemfile, add one more file
1 parent 455cb48 commit a8962b1

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
22

33
project(hello_world CXX)
44

5-
add_executable(hello_world hello_world.cpp)
5+
add_executable(hello_world hello_world.cpp vector.cpp)
66

77
enable_testing()
88

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/robertodr/danger-code_style_validation.git
3-
revision: ffb4bc0d5ce8633616f414273a5dbba5356e9f6e
3+
revision: 819a8d09b2eed7c841cb66a7d96682c77bbbcb14
44
specs:
55
danger-code_style_validation (0.0.1)
66
danger-plugin-api (~> 1.0)

hello_world.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
#include <cstdlib>
22
#include <iostream>
3+
#include <vector>
4+
5+
std::vector<int> myVector();
36

47
std::string message() {
58
return "Hello, Danger world!";
69
}
710

811
int main() {
912
std::cout << message() << std::endl;
13+
14+
std::vector< int > v = myVector();
1015
return EXIT_SUCCESS;
1116
}

vector.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <vector>
2+
3+
std::vector<int> myVector() {
4+
int arr[] = {16, 2, 77, 29};
5+
// Create a vector containing integers
6+
std::vector<int> v (arr, arr + sizeof(arr) /sizeof(arr[0]) );
7+
8+
// Add two more integers to vector
9+
v.push_back(25);
10+
v.push_back(13);
11+
12+
return v;
13+
}

0 commit comments

Comments
 (0)