This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
#define varName(_name_) #_name_ | |
#define varValue(_variable_) _variable_ | |
int main() { | |
int test = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <vector> | |
#include <random> | |
using namespace std; | |
using namespace chrono; | |
int main() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
#include <algorithm> | |
using namespace std; | |
struct Human { | |
int age = 0; | |
Human(const int& newAge) { age = newAge; } | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <random> | |
using namespace std; | |
int main() { | |
random_device rd; | |
mt19937 rng(rd()); | |
uniform_int_distribution<> dice(1, 6); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
void print(const int& i) { | |
cout << i << ' '; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <iostream> | |
using namespace std; | |
using namespace std::placeholders; | |
void show(const string& a, const string& b, const string& c) { | |
cout << a << "; " << b << "; " << c << endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## FLAGS ## | |
Libraries = -L lib | |
Headers = -I include | |
Sources = main.cpp $(Headers) $(Libraries) | |
CompilerFlags = -O3 -Wall | |
OutputName = test | |
## TARGETS ## | |
all: | |
@g++ -std=c++1z $(CompilerFlags) $(Sources) -o $(OutputName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstddef> | |
#include <cassert> | |
using namespace std; | |
int main(int argc, char *argv[]) { | |
int * numbers = nullptr; // = new int[3]{1,2,3}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <thread> | |
#include <chrono> | |
#include <ctime> | |
#include <cstddef> | |
using namespace std; | |
using namespace chrono; | |
void sortVector() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <map> | |
using namespace std; | |
int main(int argc, char *argv[]) { | |
map<string,int> dic; | |
OlderNewer