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 <iterator> | |
#include <string> | |
#include <vector> | |
class Tree { | |
struct TreeNode { | |
TreeNode *left, *right; | |
TreeNode *parent; |
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 <climits> | |
#include <iostream> | |
#include <fstream> | |
#include <cstring> | |
#include <new> | |
using namespace std; | |
/* | |
* data access layer - взаимодействует с данными непосредственно во внешних источниках |
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 <climits> | |
#include <iostream> | |
#include <cstring> | |
#include <new> | |
using namespace std; | |
class Matrix { | |
struct MatrixData { | |
double *nums; |
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 <climits> | |
#include <iostream> | |
#include <cstring> | |
#include <new> | |
using namespace std; | |
class Matrix { | |
struct MatrixData { | |
double *nums; |
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 <climits> | |
#include <iostream> | |
#include <cstring> | |
#include <new> | |
using namespace std; | |
class Matrix { | |
double *nums; | |
size_t nrows, ncols; |
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 <chrono> | |
#include <cstring> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class TwoDimArray { | |
double *data; | |
size_t nrows, ncols; | |
public: |
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; | |
class Animal { | |
string latin_name; | |
public: | |
Animal(string latin_name) : latin_name{latin_name} {} | |
virtual ~Animal() { cerr << "Animal::~Animal called for " << latin_name << endl; } | |
virtual string get_display_name() const { return latin_name; } | |
virtual int foo() = 0; |
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; | |
int ma8in() { | |
int a = 3, b = 7, c, nums[100] = { 11, 22, 33 }; | |
int *p1 = &a, *p2 = &b, *p3 = &c, *pn = nums; | |
void *p = p1; p3 = (int*)p; | |
c = a + b; | |
cout << "a=" << a << ", b=" << b << ", c=" << c | |
<< ", *p1=" << *p1 << ", *p2=" << *p2 << ", *p3=" << *p3 << 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
#include <ctime> | |
#include <iostream> | |
using namespace std; | |
class Animal { | |
string name; | |
time_t birth_date; | |
public: | |
Animal(string name, time_t birth_date) : name(name), birth_date(birth_date) {} | |
string get_name() const { return name; } | |
time_t get_birth_date() const { return birth_date; } |
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 <cmath> | |
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
float calc(string op, float x, float y); | |
int main() { | |
float x, y, res; |
NewerOlder