An open API service indexing awesome lists of open source software.

https://github.com/shakibamoshiri/1000_examples_with_cpp

Some of my practices and examples that I collected through the Internet
https://github.com/shakibamoshiri/1000_examples_with_cpp

cpp cpp11 cpp14 examples

Last synced: 9 months ago
JSON representation

Some of my practices and examples that I collected through the Internet

Awesome Lists containing this project

README

          

**Where did these examples come from?**
I just printed out the whole site of: en.cppreference.com.

**Well, maybe you ask why am I doing this stupid work?**

**First** I needed to learn English language, **second** I needed to learn 10-finger-type
and **third** I liked learning programming. So I do all three of them together. And I
typed these examples to improve my EN language and TYPING and C++ programming.

**I tested all these examples with this command-line argument:**
`g++ -std=c++14 -O2 -Wall -pedantic -pthread`

*On Gnu / Ubuntu 16.01 LTS and code::blocks IDE 16.01 (32 bit)*

If you are confusing with my examples, I apologize to you.

**You can see the major reference sites:**
:one: en.cppreference.com
:two: cplusplus.com
:three: msdn.microsoft.com

compiler:

![my compiler](https://github.com/k-five/1000_examples_with_cpp/blob/master/codeblocks.png)

operating system:

![my OS](https://github.com/k-five/1000_examples_with_cpp/blob/master/os.png)

# how many way do you know for "hello world" in C++?
```C++
#include
#include
#define HW(...) std::cout<<"1:\t"<<#__VA_ARGS__<>std::cout.rdbuf();
}
```

**output**

```c++
1: hello world!
2: hello world!
3: hello world!
4: hello world!
5: hello world!
6: hello world!
7: hello world!
8: hello world!

```

# How about obfuscation a code?
```C++
#include
#include
#define HW(...)\
std::cout<<"1:\t"<<#__VA_ARGS__<>std::cout.rdbuf();}
```
**output**

`the same as above`