| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* container -> vector
fixed errors:
- "vector_name" and "Vector_name" (different case) would have resulted in a compile time error, now: "my_vector"
enhancements:
- typedef for consistency
- two push_backs to show its purpose
- both iteration types now have a working execution block (both output the vector's content)
- the first "classic loop" now also shows the operator [], which therefor is removed from below
- include and for with a white spaces for readability
* removed the typedef
the `typedef` was used to show that we will be using `string` as our base for all operations, but we are free to use any other type; of course it is technically not needed and might look like a redundancy. the two `cin` also look redundant, so I changed this into one `cin` and two `push_back`s
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Space should be removed.
before:
// concatenated_tuple becomes = (10, 'A', 1e9, 15, 11, 'A' ,3.14141)
after:
// concatenated_tuple becomes = (10, 'A', 1e9, 15, 11, 'A', 3.14141)
Typo initialize is correct form.
before:
map<char, int> mymap; // Will initalize the map with key as char and value as int
after:
map<char, int> mymap; // Will initialize the map with key as char and value as int
Typo corresponding is correct form.
before:
// To find the value correponsing to a key
after:
// To find the value corresponding to a key
|
|
|
| |
iteartor -> iterator
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
#1817 (#2292)
* Added the Logical and bitwise operators section
* Added a note for Short Circuit evaluation
Excerpt from https://en.wikipedia.org/wiki/Short-circuit_evaluation
C++ uses minimal evaluation, or McCarthy evaluation (after John McCarthy (computer scientist)) is the semantics of some Boolean operators in some programming languages in which the second argument is executed or evaluated only if the first argument does not suffice to determine the value of the expression: when the first argument of the AND function evaluates to false, the overall value must be false; and when the first argument of the OR function evaluates to true, the overall value must be true. In some programming languages (Lisp), the usual Boolean operators are short-circuit.
|
|
|
|
|
|
|
|
| |
* Containers Added
* Text Formatting
Added required spaces between text and //
|
| |
|
|
|
| |
v.empty() queries if v is empty while v.clear() actually clears it (or rather sets size to 0).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Added in some information about enums in C++ including some different
use cases
|
|
|
|
|
| |
Clarified that private members are inherited but are not directly
accessible
|
|
|
| |
spelling error
|
|
|
| |
the address
|
|
|
| |
Better explained reference address.
|
|
|
| |
Regarding issue #1216, Better explaining the Reference 'fooRef'.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
o should be capitalized.
this: overrides
should be: Overrides
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
externally.
|
| |
|
| |
|
|
|
|
| |
nonexistant printDog function to print.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Neither gcc nor clang accept void main. Remove this bad information. Tested as follows:
$ cat 045.cpp
void main()
{
}
$ g++ 045.cpp
045.cpp:1:11: error: ‘::main’ must return ‘int’
void main()
^
$ clang++ 045.cpp
045.cpp:1:1: error: 'main' must return 'int'
void main()
^~~~
int
1 error generated.
$ g++ --version
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
$ clang++ --version
Ubuntu clang version 3.4.2-3ubuntu2~xedgers (tags/RELEASE_34/dot2-final) (based on LLVM 3.4.2)
|