Compare commits
No commits in common. "c++-11" and "main" have entirely different histories.
34
ChangeLog
34
ChangeLog
|
@ -1,34 +0,0 @@
|
||||||
2024-07-26 hwpplayer1 <hwpplayer1@debian>
|
|
||||||
|
|
||||||
* 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 <hwpplayer1@debian>
|
|
||||||
|
|
||||||
* README.md: Chapter 3. Strings, Vectors, and Arrays page 122
|
|
||||||
|
|
||||||
2024-07-01 hwpplayer1 <hwpplayer1@debian>
|
|
||||||
|
|
||||||
* src/local_j.cpp: local j value test code / 2.3. Compound Types page Page 82
|
|
||||||
|
|
||||||
2024-06-30 hwpplayer1 <hwpplayer1@debian>
|
|
||||||
|
|
||||||
* src/reused_scope.cpp: reused scope example writtenx
|
|
||||||
|
|
||||||
* src/scope_example.cpp: scope example sum of 1 to 10 inclusive is explained
|
|
||||||
|
|
||||||
* src/if_statement.cpp: if statement explained/code written
|
|
||||||
|
|
||||||
2024-06-24 hwpplayer1 <hwpplayer1@debian>
|
|
||||||
|
|
||||||
* src/for_example_2.cpp: another for example
|
|
||||||
|
|
||||||
* src/for_example.cpp: For example sum of 1 to 10 inclusive is ...
|
|
||||||
|
|
||||||
* src/sum_numbers.cpp (main): Sum of 50 to 100 inclusive is ...
|
|
||||||
|
|
||||||
* src/while_statement.cpp (main): While example written
|
|
||||||
|
|
20
README.md
20
README.md
|
@ -1,6 +1,6 @@
|
||||||
# C++ Dojo
|
# cpp-dojo
|
||||||
|
|
||||||
C++ Training
|
C++ Training with examples written by the cpp-dojo community
|
||||||
|
|
||||||
# Forge Platforms
|
# Forge Platforms
|
||||||
|
|
||||||
|
@ -22,21 +22,13 @@ C++ Training
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
C++ Training
|
C++ Training with examples written by the cpp-dojo community
|
||||||
|
|
||||||
Copyright (C) 2024 QB Networks
|
Copyright (C) 2023-2024 Mert Gör and contributors
|
||||||
|
|
||||||
Copyright (C) 2017-2024 Masscollabs Services
|
Copyright (C) 2023-2024 Masscollabs Services
|
||||||
|
|
||||||
Copyright (C) 2017-2024 Procyberian and contributors
|
Copyright (C) 2023-2024 Mass Collaboration Labs and contributors
|
||||||
|
|
||||||
Copyright (C) 2017-2024 Mass Collaboration Labs and contributors
|
|
||||||
|
|
||||||
Copyright (C) 2017-2024 amassivus and contributors
|
|
||||||
|
|
||||||
Copyright (C) 2024 godigitalist and contributors
|
|
||||||
|
|
||||||
Copyright (C) 2024 bilsege and contributors
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as published
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
|
94
src/.gitignore
vendored
94
src/.gitignore
vendored
|
@ -1,94 +0,0 @@
|
||||||
# Created by https://www.toptal.com/developers/gitignore/api/emacs
|
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=emacs
|
|
||||||
|
|
||||||
### Emacs ###
|
|
||||||
# -*- mode: gitignore; -*-
|
|
||||||
*~
|
|
||||||
\#*\#
|
|
||||||
/.emacs.desktop
|
|
||||||
/.emacs.desktop.lock
|
|
||||||
*.elc
|
|
||||||
auto-save-list
|
|
||||||
tramp
|
|
||||||
.\#*
|
|
||||||
|
|
||||||
# Org-mode
|
|
||||||
.org-id-locations
|
|
||||||
*_archive
|
|
||||||
|
|
||||||
# flymake-mode
|
|
||||||
*_flymake.*
|
|
||||||
|
|
||||||
# eshell files
|
|
||||||
/eshell/history
|
|
||||||
/eshell/lastdir
|
|
||||||
|
|
||||||
# elpa packages
|
|
||||||
/elpa/
|
|
||||||
|
|
||||||
# reftex files
|
|
||||||
*.rel
|
|
||||||
|
|
||||||
# AUCTeX auto folder
|
|
||||||
/auto/
|
|
||||||
|
|
||||||
# cask packages
|
|
||||||
.cask/
|
|
||||||
dist/
|
|
||||||
|
|
||||||
# Flycheck
|
|
||||||
flycheck_*.el
|
|
||||||
|
|
||||||
# server auth directory
|
|
||||||
/server/
|
|
||||||
|
|
||||||
# projectiles files
|
|
||||||
.projectile
|
|
||||||
|
|
||||||
# directory configuration
|
|
||||||
.dir-locals.el
|
|
||||||
|
|
||||||
# network security
|
|
||||||
/network-security.data
|
|
||||||
|
|
||||||
|
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/emacs
|
|
||||||
|
|
||||||
# Created by https://www.toptal.com/developers/gitignore/api/c++
|
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=c++
|
|
||||||
|
|
||||||
### C++ ###
|
|
||||||
# Prerequisites
|
|
||||||
*.d
|
|
||||||
|
|
||||||
# Compiled Object files
|
|
||||||
*.slo
|
|
||||||
*.lo
|
|
||||||
*.o
|
|
||||||
*.obj
|
|
||||||
|
|
||||||
# Precompiled Headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
|
||||||
|
|
||||||
# Compiled Dynamic libraries
|
|
||||||
*.so
|
|
||||||
*.dylib
|
|
||||||
*.dll
|
|
||||||
|
|
||||||
# Fortran module files
|
|
||||||
*.mod
|
|
||||||
*.smod
|
|
||||||
|
|
||||||
# Compiled Static libraries
|
|
||||||
*.lai
|
|
||||||
*.la
|
|
||||||
*.a
|
|
||||||
*.lib
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
*.exe
|
|
||||||
*.out
|
|
||||||
*.app
|
|
||||||
|
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/c++
|
|
|
@ -1,12 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
std::cout << "enter two numbers:" << std::endl;
|
|
||||||
int value1 = 0, value2 = 0;
|
|
||||||
std::cin >> value1 >> value2;
|
|
||||||
std::cout << "The sum of " << value1 << " and " << value2
|
|
||||||
<< " is " << value1 + value2 << std::endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int sum = 0;
|
|
||||||
|
|
||||||
for (int value = 1; value <= 10; ++value)
|
|
||||||
|
|
||||||
sum += value;
|
|
||||||
|
|
||||||
std::cout << "Sum of 1 to 10 inclusive is "
|
|
||||||
<< sum << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int sum = 0;
|
|
||||||
|
|
||||||
for (int value = 1; value <= 5; ++value)
|
|
||||||
{
|
|
||||||
sum += value;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "Sum of 1 to 10 inclusive is "
|
|
||||||
<< sum << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
std::cout << "Hello World of C++\n";
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int currVal = 0, val = 0;
|
|
||||||
|
|
||||||
if (std::cin >> currVal)
|
|
||||||
{
|
|
||||||
int cnt = 1;
|
|
||||||
while (std::cin >> val)
|
|
||||||
{
|
|
||||||
if (val == currVal)
|
|
||||||
{
|
|
||||||
++cnt;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cout << currVal << " occurs "
|
|
||||||
<< cnt << " times " << std::endl;
|
|
||||||
currVal = val;
|
|
||||||
cnt = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::cout << currVal << " occurs "
|
|
||||||
<< cnt << " times " << std::endl;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int i = 42;
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int i = 100;
|
|
||||||
std::cout << "int i local i is "
|
|
||||||
<< i << std::endl;
|
|
||||||
int j = i;
|
|
||||||
std::cout << "int j local j is "
|
|
||||||
<< i << std::endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int reused = 42;
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int unique = 0;
|
|
||||||
|
|
||||||
std::cout << reused << " " << unique << std::endl;
|
|
||||||
|
|
||||||
int reused = 0;
|
|
||||||
|
|
||||||
std::cout << reused << " " << unique << std::endl;
|
|
||||||
|
|
||||||
std::cout << ::reused << " " << unique << std::endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int sum = 0;
|
|
||||||
for (int val = 0; val <= 10; ++val)
|
|
||||||
|
|
||||||
sum += val;
|
|
||||||
std::cout << "Sum of 1 to 10 inclusive is "
|
|
||||||
<< sum << std::endl;
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int sum = 0, value = 50;
|
|
||||||
|
|
||||||
while(value <= 100)
|
|
||||||
{
|
|
||||||
sum += value;
|
|
||||||
++value;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "Sum of 50 to 100 inclusive is " << sum << std::endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int sum = 0, value = 1;
|
|
||||||
|
|
||||||
while(value <= 10)
|
|
||||||
{
|
|
||||||
sum += value;
|
|
||||||
++value;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "Sum of 1 to 10 inclusive is " << sum << std::endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user