diff --git a/C++ Primer (5th Edition).pdf b/C++ Primer (5th Edition).pdf new file mode 100644 index 0000000..38e943f Binary files /dev/null and b/C++ Primer (5th Edition).pdf differ diff --git a/ChangeLog b/ChangeLog index 1d2d699..e51f8fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-07-26 hwpplayer1 + + * src/decleration.cpp: decleration example + + * src/namespace_decleration.cpp: namespace / decleration example + + * C++ Primer (5th Edition).pdf: 3.2. Library string Type page 125 + 2024-07-03 hwpplayer1 * README.md: Chapter 3. Strings, Vectors, and Arrays page 122 diff --git a/src/decleration.cpp b/src/decleration.cpp new file mode 100644 index 0000000..98ef00c --- /dev/null +++ b/src/decleration.cpp @@ -0,0 +1,13 @@ +#include + +using std::cin; +using std::cout; using std::endl; +int main() +{ + cout << "Enter two numbers:" << endl; + int v1, v2; + cin >> v1 >> v2; + cout << "The sum of " << v1 << " and " << v2 + << " is " << v1 + v2 << endl; + return 0; +} diff --git a/src/namespace_decleration.cpp b/src/namespace_decleration.cpp new file mode 100644 index 0000000..98ef00c --- /dev/null +++ b/src/namespace_decleration.cpp @@ -0,0 +1,13 @@ +#include + +using std::cin; +using std::cout; using std::endl; +int main() +{ + cout << "Enter two numbers:" << endl; + int v1, v2; + cin >> v1 >> v2; + cout << "The sum of " << v1 << " and " << v2 + << " is " << v1 + v2 << endl; + return 0; +}