Skip to content

Commit d8fbb85

Browse files
authored
Merge pull request #8 from Vaibhav-kesarwani/New_Language_CPP
Added the new language CPP
2 parents f0b6f90 + a2718de commit d8fbb85

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

public/data/_index.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
{
1515
"lang": "SCSS",
1616
"icon": "/icons/sass.svg"
17+
},
18+
{
19+
"lang": "CPP",
20+
"icon": "/icons/cpp.svg"
1721
}
1822
]

public/data/cpp.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{
3+
"categoryName": "String Manipulation",
4+
"snippets": [
5+
{
6+
"title": "Reverse String",
7+
"description": "Reverses the characters in a string.",
8+
"code": [
9+
"string reverseString(const string& input) {",
10+
" string reversed = input;",
11+
" reverse(reversed.begin(), reversed.end()); // Using STL's reverse function",
12+
" return reversed;",
13+
"}"
14+
],
15+
"tags": ["cpp", "array", "reverse", "utility"],
16+
"author": "Vaibhav-kesarwani"
17+
}
18+
]
19+
}
20+
]

public/icons/cpp.svg

Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)