From 098f9c478e6658bc7dfc6dab2a7aedae3f9a38af Mon Sep 17 00:00:00 2001 From: prashantkumar1997 Date: Sat, 11 May 2019 04:34:50 +0530 Subject: [PATCH] Added reference links section (#29593) * Added reference links section * fix: changed c++ to cpp * fix: changed one extra c++ to cpp --- guide/english/cplusplus/c-stl-sets/index.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guide/english/cplusplus/c-stl-sets/index.md b/guide/english/cplusplus/c-stl-sets/index.md index eb88ffdc72..033752944b 100644 --- a/guide/english/cplusplus/c-stl-sets/index.md +++ b/guide/english/cplusplus/c-stl-sets/index.md @@ -12,12 +12,13 @@ Sets are a type of associative container in which each element has to be unique. 4. There are many inbuilt functions in class defining sets that ease the programming. Example: -```c++ +```cpp #include #include using std::set; using std::cout; using std::endl; + int main() { set s; @@ -38,20 +39,22 @@ return 0; [Try this code out yourself!](https://wandbox.org/permlink/XIFK4d9suQdGniFm) Creating a set object -```c++ +```cpp set s; ``` Insertion -```c++ +```cpp s.insert(value_to_be_inserted); ``` Accessing set elements -```c++ +```cpp set ::iterator it; for(it = s.begin(); it != s.end(); ++it) cout << *it; ``` +## Reference Links +[Geeks for Geeks link to C++ stl](https://www.geeksforgeeks.org/set-in-cpp-stl/ )