Skip to content

Commit

Permalink
WIP on cpp: 5705d32 10.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sjnaj committed Oct 10, 2021
2 parents 5705d32 + 48a6328 commit d89d951
Show file tree
Hide file tree
Showing 12 changed files with 5,585 additions and 3,908 deletions.
45 changes: 44 additions & 1 deletion CppTest/class/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,49 @@
"*.py": "python",
"*.txt": "cmake",
"iostream": "cpp",
"ostream": "cpp"
"ostream": "cpp",
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"typeinfo": "cpp",
"bit": "cpp"
}
}
Binary file modified CppTest/class/bin/class
Binary file not shown.
Binary file modified CppTest/class/build/.ninja_deps
Binary file not shown.
85 changes: 39 additions & 46 deletions CppTest/class/build/.ninja_log
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@
# ninja log v5
2 41 1633532489384378218 src/CMakeFiles/LINK.dir/func.cpp.o c559b6897eb11158
41 87 1633532489428379237 src/libLINK.a f4d035ee31c93e16
1 601 1633532489948391291 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
602 745 1633532490088394529 ../bin/project dfe01b52c2bdf6ed
3 804 1633532683693536721 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
804 1017 1633532683905539027 ../bin/project dfe01b52c2bdf6ed
3 828 1633532734410037095 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
829 983 1633532734566038487 ../bin/project dfe01b52c2bdf6ed
2 1032 1633533094142083221 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
1033 1264 1633533094374083533 ../bin/project dfe01b52c2bdf6ed
11 946 1633533793181414607 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
946 1102 1633533793337415641 ../bin/project dfe01b52c2bdf6ed
6 978 1633534002488871079 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
978 1178 1633534002688876564 ../bin/project dfe01b52c2bdf6ed
3 876 1633534757467864569 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
876 1049 1633534757639867512 ../bin/project dfe01b52c2bdf6ed
2 891 1633535726921879451 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
891 1058 1633535727089882999 ../bin/project dfe01b52c2bdf6ed
1 579 1633537218006703561 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
579 711 1633537218138691723 ../bin/class 5a940236adfbf7f4
1 627 1633537656754751197 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
627 761 1633537656886753826 ../bin/class 5a940236adfbf7f4
20 390 1633598482872912349 src/CMakeFiles/LINK.dir/func.cpp.o c559b6897eb11158
390 482 1633598482960616752 src/libLINK.a f4d035ee31c93e16
9 1342 1633598550187613977 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1342 1557 1633598550403890821 ../bin/class 5a940236adfbf7f4
29 810 1633598640338848037 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
810 962 1633598640487002564 ../bin/class 5a940236adfbf7f4
2 835 1633602952482355273 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
835 1008 1633602952654452119 ../bin/class 5a940236adfbf7f4
2 858 1633602972038040235 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
858 1017 1633602972194138112 ../bin/class 5a940236adfbf7f4
1 563 1633603059815559847 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
563 690 1633603059939627755 ../bin/class 5a940236adfbf7f4
2 569 1633603121678893028 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
569 670 1633603121778687720 ../bin/class 5a940236adfbf7f4
3 443 1633612228043196690 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
443 525 1633612228123077110 ../bin/class 5a940236adfbf7f4
1 518 1633612424707239979 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
518 621 1633612424811312781 ../bin/class 5a940236adfbf7f4
1 339 1633612550452489097 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
339 420 1633612550532542595 ../bin/class 5a940236adfbf7f4
2 611 1633615285596975829 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
612 746 1633615285729087393 ../bin/class 5a940236adfbf7f4
1 342 1633615440590635180 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
342 429 1633615440674692378 ../bin/class 5a940236adfbf7f4
1 364 1633615736100076215 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
364 446 1633615736179773074 ../bin/class 5a940236adfbf7f4
2 891 1633535726921879451 CMakeFiles/project.dir/main.cpp.o 22a0413fade49a44
2 1426 1633773412320225067 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1426 1681 1633773412572223056 ../bin/class 5a940236adfbf7f4
3 1399 1633773425880085096 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1399 1670 1633773426152082689 ../bin/class 5a940236adfbf7f4
3 1409 1633773438843971832 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1409 1676 1633773439115969466 ../bin/class 5a940236adfbf7f4
4 1395 1633773450863867315 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1396 1689 1633773451155864777 ../bin/class 5a940236adfbf7f4
2 1241 1633773463059761281 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1242 1609 1633773463423758116 ../bin/class 5a940236adfbf7f4
3 1243 1633773633002017513 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1244 1481 1633773633238014992 ../bin/class 5a940236adfbf7f4
2 1177 1633773647853858843 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1177 1460 1633773648137855809 ../bin/class 5a940236adfbf7f4
3 1154 1633773661197692990 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1154 1424 1633773661465689827 ../bin/class 5a940236adfbf7f4
3 1403 1633773687781390571 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1403 1696 1633773688073387269 ../bin/class 5a940236adfbf7f4
2 1149 1633773701453236009 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1149 1400 1633773701705233160 ../bin/class 5a940236adfbf7f4
5 991 1633777060281924849 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
992 1280 1633777060569925144 ../bin/class 5a940236adfbf7f4
3 1393 1633777288366613179 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1394 1675 1633777288650614289 ../bin/class 5a940236adfbf7f4
2 1346 1633777350458905792 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1346 1661 1633777350770907235 ../bin/class 5a940236adfbf7f4
3 1334 1633777579368380309 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1334 1639 1633777579672382561 ../bin/class 5a940236adfbf7f4
6 1398 1633777625460751292 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1398 1718 1633777625780753933 ../bin/class 5a940236adfbf7f4
2 1232 1633777865615042025 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1233 1516 1633777865895045049 ../bin/class 5a940236adfbf7f4
5 1566 1633777993212500727 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1566 1931 1633777993576505046 ../bin/class 5a940236adfbf7f4
2 726 1633778506411798652 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
726 908 1633778506595801553 ../bin/class 5a940236adfbf7f4
2 1056 1633778526556133525 CMakeFiles/class.dir/main.cpp.o 839c7059ce29b715
1056 1300 1633778526800137483 ../bin/class 5a940236adfbf7f4
70 changes: 47 additions & 23 deletions CppTest/class/build/CMakeFiles/class.dir/main.cpp.ii
Original file line number Diff line number Diff line change
Expand Up @@ -28626,16 +28626,19 @@ namespace std __attribute__ ((__visibility__ ("default")))

}
# 7 "../main.cpp" 2



# 1 "../src/func.h" 1






# 8 "../main.cpp" 2
# 11 "../main.cpp" 2

# 8 "../main.cpp"
# 11 "../main.cpp"
enum Example : unsigned char
{
a = 10,
Expand All @@ -28647,43 +28650,64 @@ enum Example : unsigned char
g,
h
};
class Entity
class Virtual
{
public:
virtual ~Virtual() = default;
virtual void func() = 0;
};
class Entity : public Virtual
{
protected:
int a, b;
public:
Entity(int x, int y) : a(x), b(y) {}
Entity(){std::cout<<"lalala"<<std::endl;}
void func() { std::cout << "NULL FUNC" << std::endl; }
Entity() { std::cout << "lalala" << std::endl; }
void func() override { std::cout << a << ' ' << "This is Entity" << std::endl; }
void func(int x) { std::cout << x << std::endl; }

static int x, y;
static const int x=1, y=2;
static void Print()
{
std::cout << x << ' ' << y << std::endl;
}
virtual ~Entity() = default;
};
class Derive : public Entity
{
private:
int x, y;

public:
mutable int x1;
using Entity::func;
void func(int x) { std::cout << x + 1 << std::endl; }
void func() { std::cout << a << std::endl; }
Derive(int x, int y) {a=x;}
void func() override { std::cout << a << ' ' << "This is Derive" << std::endl; }
int getVal()const
{
return a;
x1=2;
}
Derive(int x, int y)
{
this->x = x;
this->y = y;
a = 10;
}
Derive(int x) { a = x; }
Derive() = default;
};
int Entity::x, Entity::y;

int main()
{
Example p = a;
std::cout << p << std::endl;
Entity entity{1, 2};
entity.x = 10;
entity.y = 20;

Derive derive{3, 4};
derive.func(2);
derive.func();
Entity::Print();
Entity::x = 15;
Entity::y = 25;
entity.Print();
# 83 "../main.cpp"
const Derive derive(3);
std::cout<<derive.getVal()<<std::endl;
Derive derive1(4);
std::cout<<derive1.getVal()<<std::endl;
const volatile int x=1;

int *p=(int*)&x;
*p=10;
std::cout <<x<<std::endl;
# 109 "../main.cpp"
}
Binary file modified CppTest/class/build/CMakeFiles/class.dir/main.cpp.o
Binary file not shown.
Loading

0 comments on commit d89d951

Please sign in to comment.