C ??? ???? ??? ???, ??? ? ??? ???? ?? ?? ?? ????? ?????. 1) std :: ?? _ptr ? std :: shared_ptr? ?? ??? ???? ??? ??? ?? ??? ??? ?????. 2) ???? ?? ?????? ???? ?? ??? ?? ??????. 3) ?? ??? ? RValue ??? ??? ?? ???, except? ???? ???? ???????.
??
????? ???? C? ???? ??? ??, ?? ????? ?????? ??? ??????? ?? ?? ??????. ? ??? C? ?? ??? ????? ?? ?? ????? ?? ??? ?? ??? ???????. ? ??? ??? C, ??? ? ????? ??? ???? ?? ???? ?? ???? ??? ??? ???? ??? ?? ? ????.
?? ?? ??
C? ?? ??? ?? ???? ?? ??? ??? ??? ?? ?? ????? ?????. ?? ?? ?????, ?? ????? ? ?? ?????? ??? ??? ????? ????? ?????. ??? ??? ??? ??? ?? ??? ?? ?????? ???? ??? ?? ??? ? ?? ????.
C? ?? ?????? ??? ????? ????? ???? ??? ?? ?? ?????. ??, ??, ?, ???? ??????? ?? ? ??? ?? ??? ??? ?? ???? ??? ???? ?? ??? ??? ?????.
?? ?? ?? ?? ??
??? ??? ? ??? ??
C? ??? ??? ?? ???? ???????. std::unique_ptr
? std::shared_ptr
? ?? ??? ???? ?? C?? ??? ???, ???? ??? ??? ??? ???? ??? ? ??????.
#include <Memory> #include <iostream> ??? myclass { ???: void dosomething () {std :: cout << "?????? ... \ n"; } }; int main () { // std :: ?? _ptr? ????? std :: ?? ? <myclass> eliqueptr (new myclass ()); iriqueptr-> dosomething (); // std :: shared_ptr? ????? std :: shared_ptr <myclass> sharedptr (new myclass ()); sharedptr-> dosomething (); ?? 0; }
??? ???? ?? ?? ?? ?? ???? ?? ??? ????? ???? ?????. std::unique_ptr
? ?? ???? ?? ? ??? ???????? std::shared_ptr
???? ??? ??? ?? ? ??? ?? ???? ??? ??? ?? ? ? ????.
??? ? ?? ?????
C? ??? ???? ??? ?? ? ????, ?? ??? ???? ??? ??? ???? ?? ? ? ??????. ??? ??? ??? ?? ?? ???? ????? ???? ? ????.
??? <typename t> t max (t a, t b) { ?? (a> b)? A : B; } int main () { std :: cout << max (5, 10) << std :: endl; // ?? 10 std :: cout << max (3.14, 2.71) << std :: endl; // ?? 3.14 ?? 0; }
???? ?? ???? ??? ?? ?? ??? ????, ?? ???? ??? ??? ?? ??? ?? ???? ????. ??? ??? ???? ?? ???? ?? ? ??? ??? ??? ??? ??? ??? ? ???? ??? ?????.
??? ? RValue ??? ??????
C 11? ??? ??? ? RValue ??? ???? ????? ??? ?? ??????. ??? ??? ???? ???? ?? ????? ?? ?????.
#include <iostream> #include <vector> ??? myclass { ???: myclass () {std :: cout << "??? \ n"; } myclass (myclass && other) noexcrect {std :: cout << "??? ?? \ n"; } myclass & operator = (myclass && other) noexcrect {std :: cout << "?? ??? ?? \ n"; ?? *??; } }; int main () { std :: vector <myclass> vec; vec.push_back (myclass ()); // ?? ????? MyClass obj = std :: move? ????? (myclass ()); // ?? ???? ???? ???? 0? ?????. }
??? ??? ???? ?? ??? ????? ???? ??????. RValue References ( &&
)? ??? ?? ??? ???? ??? ??? ? ??? ?? ???? ??? ? ??????. ??? ??? ??? ???? ????? ?? ??? ???? ?? noexcept
???? ???? ???? ?????.
??? ?
?? ??
??? ??? ??? ???? ?? C? ?? ?????? ???? ??? ?? ??? ? ?? ????. ?? ??, std::vector
? std::algorithm
???? ??? ?? ????? ??????.
#include <vector> #include <algorithm> #include <iostream> int main () { std :: vector <int> ?? = {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; std :: sort (numbers.begin (), ??.end ()); for (int num : ??) { std :: cout << num << ""; } std :: cout << std :: endl; ?? 0; }
? ??? std::vector
? std::sort
???? ?? ??? ???? ??? ?????. ??? ?? ????? ??? ??? ???? ?? ????? ???? ?? ?????.
?? ??
?? ?? ?????? C? ?? ??? ???? ??? ??? ???? ??? ?? ??? ? ?? ????. ?? ?? Lambda Expressions ? std::function
???? ?? ?? ????? ??????.
#include <functional> #include <iostream> void execute (std :: function <void ()> ??) { ?? (); } int main () { auto lambda = [] () {std :: cout << "?? ?? \ n"; }; ?? (??); ?? 0; }
? ??? Lambda ??? ? std::function
???? ???? ?? ????? ???? ??? ?????. ? ??? ?? C?? ?? ????? ??? ?? ?? ??? ??? ? ????.
???? ?? ? ??? ?
????? ???? ??? ??? ??? ???? ?? ?? ?????. ?? ??, ???? ??? ??? ??? ???? ???? ?? ???? ??? ?????.
#include <vector> void inferficialfunction () { std :: vector <int> vec; for (int i = 0; i <10000; i) { vec.push_back (i); // ? push_back? ??? ? ??? ??? ? ????} } void expicientfunction () { std :: vector <int> vec; Vec.Reserve (10000); // (int i = 0; i <10000; i) {? ?? ??? ? ??? ??? ?? ???? prealloce ??? vec.push_back (i); } }
inefficientFunction
?? ? push_back
??? ???? ? ???? ??? ???? ? ????. ??? reserve
efficientFunction
????. ??? ??? ??? ???? ????? ?? ?? ??? ?? ?? ? ? ????.
?? ??? ? ?? ??
?? ?? ???? C ??? ??? ????? ?? ?? ?????. ?? ?? ??? ?? ??? ???? ??? ??? ???? ?? ????? ???? ?? ?????. ?? ??, std::vector
? std::list
? ??? ??????.
#include <vector> #Include <ist> #include <Chrono> #include <iostream> void benchmarkVector () { std :: vector <int> vec; ?? ?? = std :: Chrono :: High_resolution_clock :: now (); for (int i = 0; i <1000000; i) { vec.push_back (i); } ?? ?? = std :: Chrono :: High_resolution_clock :: now (); ?? ?? = std :: chrono :: duration_cast <std :: chrono :: microseconds> (END -Start); std :: cout << "?? ?? _back ?? :"<< duration.count () << "???? ? \ n"; } void benchmarkList () { std :: list <int> lst; ?? ?? = std :: Chrono :: High_resolution_clock :: now (); for (int i = 0; i <1000000; i) { lst.push_back (i); } ?? ?? = std :: Chrono :: High_resolution_clock :: now (); ?? ?? = std :: chrono :: duration_cast <std :: chrono :: microseconds> (END -Start); std :: cout << "list push_back time :"<< duration.count () << "microseconds \ n"; } int main () { BenchmarkVector (); BenchmarkList (); ?? 0; }
? ??? push_back
???? std::vector
? std::list
? ?? ??? ???? ??? ?????. ??? ?? ??? ???? ????? ???? ?? ?? ????? ?? ?? ??? ? ? ?? ? ? ??????.
????? ?? ? ?? ?? ???? ??? ?? ? ?? ???? ?? ?? ?????. ?? ??, ???? ?? ??? ????, ??? ????, ??? ?? ???? ??? ?? ????? ???? ???? ?? ?????.
???, C? ?? ??? ?? ??? ????? ????? ? ???? ? ??? ??? ??? ?? ??????? ???? ?? ??? ??????. ? ??? ??? ??? ???? ?? ?? ????? ????? ????.
? ??? Advanced C ???? : ?? ?? ???? ??????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

PHP? AI ??? ?? ??? ??? ?? AI ??? API (? : OpenAI, HuggingFace)? ?????? ???? ??? ???, API ??, ?? ?? ? ?? ?????? ???? ????. 2. ??? ??? ??? ??? AI ???? ???? ????. ?? ??? API, ??? ?? ? ??? ??? ???? ????. 3. ?? ??? ?? ??, ??, ??, ???, ??? ????? ? GPT ?? BART/T5? ?? ?? ??? ???????. 4. ?? ????? ??, ??? ?, ?? ?? ? ?? ?? ??? ?????. ?? ??? ???? ????? ???? ??? ???? ?? ?? ?? ? ??, ???? ?? ??, ?? ??, ?? ?? ? ??? ???????.

??? ?? ??? ? ???? ???? ? ???? C? ??? ???? ?? ?????. 1. ??? Intadd (Inta, Intb)? ?? ?? ? ??? ?? ?????. 2. ??? ?? ? ? ?? ??? ???? ??? ?? ? ? ?? ??? ??? ?????. 3. ?? ???? ??? ??? ??? ???? ?? voidGreet (StringName)? ?? ?? ???? void? ?????. 4. ??? ???? ?? ???? ?????, ??? ???, ?? ??? ???? ? ? ???, ?? C ?????? ?? ?????.

decltype? ??? ??? ?? ??? ???? ?? C 11?? ???? ??????. ?? ??? ???? ?? ??? ???? ????. 1. decltype (expression) ? ??? ???? ??? ???? ????. 2. ?? ?? decltype (x)? ?? ???? ???? ??, decltype ((x))? lvalue ???? ?? X? ?????. 3. ????? ?? ?? ?? ?? ?? AUTO-> DECTYPE (t u)? ?? ?? ?? ???? ? ?????. 4. ??? ?? ??? decltype (vec.begin ())? ?? ???? ???? ??? ? ? ????. it = vec.begin (); 5. ????? ?? ?? ???? ?????

C Follerexpressions? Variadic ?? ?? ????? ?? ??? ????? ?? C 17? ?? ?? ? ?????. 1. ?? ?? (Args ...) ?? (1,2,3,4,5)? ?? ???? ????? ??? ?????. 2. ????? (Args && ...) ?? ?? ??? ???? ???? ? ??? true? ?????. 3. ?? (std :: cout

C? ?? ?? ?? ??? ??? ????? ?? ???? ????? ??? ????. ?? ??? (?? : ??)??? ???, ?? intarr [] ?? std :: vectorvec? ?? ??? ? STL ????? ?????. ?? (? : conststd :: string & name)? ???? ?? ?? ??? ??? ?? ???? ??? ? ????. ??? ??? ????. 1. ???? ???? ??? ???? ????. 2. ??? ????? ???? ?? ??? ??? ?????. 3. ?? ???? ??? ???? ?? ?? ??? ?????. ??? ?? ???? ?????? ??? ????? ???? ??? ? ????.

AbinarySearchTree (BST) IsabinaryTreewheretHeleftSubtreeContainlynodeswithValuessThanthenode 'svalue, grightSubtreecontainsonlynodeswithValuestthanThantenode'svalue ? bothsubtreesmustalsbsts;

C?? Python ????? ????? Pythoncapi? ?? ??? ?????. ?? ???? ??? ? ?? ??? ???? ??? ?? ? ?? ????? ???? ??????. ?? ??? ??? ????. 1. Py_Initialize ()? Python ???? ??????. 2. pyimport_import ()? Python ???? ?????????. 3. pyobject_getattrstring ()? ?? ?? ??? ????. 4. pyobject_callobject ()? ???? ?? ??? ???? ??? ??????. 5. Py_decref () ? py_finalize ()? ???? ???? ???? ???? ?????. ? ???? Hello? ????? ?????

STD :: Deque? ?? ??? ???? ?? ? ??? ???? ??? ???????. 1. Push_Front/POP_FRONT ? PUSH_BACK/POP_BACK ??? ??? ???? ??? ? ????. 2. ?? ??? ? ?? ??? ????? ???? ????? ??? & dq [0]? C ??? ??? ? ????. 3. ?? ? ???? ?? ??? ???? ??? ???? ??? ? ??? ?? ?? ??? ????. 4. ???? ?, BF, ?? ?? ??? ? ?? ????? ?????. 5. ??? ?? ??? ??? ? ??? ???? ??? ?????? ???????. ???, ?? ???? ???? ?? ??? ??? ??? ?? ???? ?? ???? ?? std :: deque? ???? ????.
