diff --git a/c++.html.markdown b/c++.html.markdown
index 290633f3..5dc1af59 100644
--- a/c++.html.markdown
+++ b/c++.html.markdown
@@ -808,8 +808,8 @@ void doSomethingWithAFile(const std::string& filename)
// have default comparators, but you can override it.
class Foo {
public:
- int j;
- Foo(int a) : j(a) {}
+ int j;
+ Foo(int a) : j(a) {}
};
struct compareFunction {
bool operator()(const Foo& a, const Foo& b) const {
@@ -948,7 +948,7 @@ f1 = f2;
#include
-// Conceptually, Tuples are similar to old data structures (C-like structs) but instead of having named data members ,
+// Conceptually, Tuples are similar to old data structures (C-like structs) but instead of having named data members,
// its elements are accessed by their order in the tuple.
// We start with constructing a tuple.
@@ -958,10 +958,10 @@ const int maxN = 1e9;
const int maxL = 15;
auto second = make_tuple(maxN, maxL);
-// printing elements of 'first' tuple
+// Printing elements of 'first' tuple
cout << get<0>(first) << " " << get<1>(first) << "\n"; //prints : 10 A
-// printing elements of 'second' tuple
+// Printing elements of 'second' tuple
cout << get<0>(second) << " " << get<1>(second) << "\n"; // prints: 1000000000 15
// Unpacking tuple into variables
@@ -989,43 +989,43 @@ cout << get<5>(concatenated_tuple) << "\n"; // prints: 'A'
/////////////////////
-// CONTAINERS
+// Containers
/////////////////////
-// Containers or the Standard Template Library are some predefined templates
-// They manages the storage space for its elements and provide
-// member functions to access and manipulate them
+// Containers or the Standard Template Library are some predefined templates.
+// They manage the storage space for its elements and provide
+// member functions to access and manipulate them.
-// Few containers are as follows:-
+// Few containers are as follows:
-// Vectors (Dynamic arrays)
+// Vector (Dynamic array)
// Allow us to Define the Array or list of objects at run time
-#include // will include the header file for vector
-vector< Data_Type > Vector_name; // used to initialize the vector
-cin>>val;
+#include
+vector Vector_name; // used to initialize the vector
+cin >> val;
Vector_name.push_back(val); // will push the value of variable into array
-// To iterate through vector, we have 2 choices
-// using normal looping
+// To iterate through vector, we have 2 choices:
+// Normal looping
for(int i=0; i::iterator it; // initialize the iteartor for vector
for(it=vector_name.begin(); it!=vector_name.end();++it)
// For accessing the element of the vector
// Operator []
-var= vector_name[index]; //will assign value at that index to var
+var = vector_name[index]; // Will assign value at that index to var
// Set
-// Sets are containers that store unique elements following a specific order
-// Very useful container to store unique values in sorted order
-// without any other functions or code
+// Sets are containers that store unique elements following a specific order.
+// Set is a very useful container to store unique values in sorted order
+// without any other functions or code.
-#include // Will include the header file for sets
-set< int > ST; // Will initialize the set of int data type
+#include
+set ST; // Will initialize the set of int data type
ST.insert(30); // Will insert the value 30 in set ST
ST.insert(10); // Will insert the value 10 in set ST
ST.insert(20); // Will insert the value 20 in set ST
@@ -1037,47 +1037,47 @@ ST.insert(30); // Will insert the value 30 in set ST
ST.erase(20); // Will erase element with value 20
// Set ST: 10 30
// To iterate through Set we use iterators
-set< int >::iterator it;
-for(it=ST.begin();it::iterator it;
+for(it=ST.begin();it // Will include the header file for map
-map< char, int >mymap; // Will initalize the map with key as char and value as int
+#include