examples from C++ Primer but with own mind/consciousness

This commit is contained in:
Mert Gör 🇹🇷 2024-06-23 22:32:48 +03:00
parent 81891b741f
commit 441c2ab363
Signed by: hwpplayer1
GPG Key ID: 03E547D043AB6C8F
3 changed files with 114 additions and 0 deletions

94
src/.gitignore vendored Normal file
View File

@ -0,0 +1,94 @@
# 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++

12
src/calculate.cpp Normal file
View File

@ -0,0 +1,12 @@
#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;
}

8
src/hello.cpp Normal file
View File

@ -0,0 +1,8 @@
#include <iostream>
int main()
{
std::cout << "Hello World of C++\n";
return 0;
}