examples from C++ Primer but with own mind/consciousness
This commit is contained in:
		
							
								
								
									
										94
									
								
								src/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								src/.gitignore
									
									
									
									
										vendored
									
									
										Normal 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
									
								
							
							
						
						
									
										12
									
								
								src/calculate.cpp
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										8
									
								
								src/hello.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
#include <iostream>
 | 
			
		||||
 | 
			
		||||
int main()
 | 
			
		||||
{
 | 
			
		||||
  std::cout << "Hello World of C++\n";
 | 
			
		||||
  
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user