Skip to content

Commit 872f957

Browse files
Update vector-print.md
1 parent d91dbda commit 872f957

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

snippets/cpp/debuging/vector-print.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: vector-print
2+
title: Vector Print
33
description: Overloads the << operator to print the contents of a vector just like in python.
44
author: Mohamed-faaris
55
tags: printing,debuging,vector
@@ -22,7 +22,7 @@ std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) {
2222
return os; // Return the stream
2323
}
2424

25-
//std::vector<int> numbers = {1, 2, 3, 4, 5};
26-
//std::cout << numbers << std::endl; // Outputs: [1, 2, 3, 4, 5]
25+
std::vector<int> numbers = {1, 2, 3, 4, 5};
26+
std::cout << numbers << std::endl; // Outputs: [1, 2, 3, 4, 5]
2727

2828
```

0 commit comments

Comments
 (0)