- Aug 2022
-
kodlogs.net kodlogs.net
-
These methods of interaction and your storyline of yours will definitely make the game interesting. You are all set to make a text-based game by yourself. Go get started and show your skills.
How to make text-based games in C++
-
- Apr 2022
-
www.learncpp.com www.learncpp.com
-
By default, C++ will provide a copy constructor and copy assignment operator if one is not explicitly provided. These compiler-provided functions do shallow copies, which may cause problems for classes that allocate dynamic memory. So classes that deal with dynamic memory should override these functions to do deep copies.
c++ 默认提供什么样的 copy constructor,这会导致什么问题?
-
- Mar 2022
-
www.learncpp.com www.learncpp.com
-
Move semantics means the class will transfer ownership of the object rather than making a copy.
move semantics 是什么意思?
-
A Smart pointer is a composition class that is designed to manage dynamically allocated memory and ensure that memory gets deleted when the smart pointer object goes out of scope.
smart pointer 是什么?有什么好处?
-
-
www.cs.cmu.edu www.cs.cmu.edu
-
● Global symbols○ Symbols defined by module m that can be referenced by other modules.■ e.g., non-static C functions and non-static global variables.● External symbols○ Global symbols that are referenced by module m but defined by some other module.● Local symbols○ Symbols that are defined and referenced exclusively by module m.■ e.g., C functions and global variables defined with the static attribute.○ Local linker symbols are not local program variables
分别有哪些 linker symbol?
-
● Symbol resolution○ Programs define and reference symbols (global variables and functions)○ Linker associates each symbol reference with exactly 1 symbol definition● Relocation○ Merges separate code and data sections into single sections○ Relocates symbols from relative locations in .o files to final memory locations○ Updates all references to symbols to reflect new positions
linker 到底做了什么?
-
● Aggregates multiple independently compiled files containing machine code● Fills in those unknown addresses● The goal is to create 1 file with all of the needed code to run the program
linker 的流程是什么?
-
○ This changes the format and structure of the code but preserves the semantics (what it does)○ Can change lots of details for optimization, as long as the overall effect is the same
compiler 部分的流程是什么?
-
● Processes #include, #define, #if, macros○ Combines main source file with headers (textually)○ Defines and expands macros (token-based shorthand)○ Conditionally removes parts of the code (e.g. specialize for Linux, Mac, ...)● Removes all comments
Pre-Processor 部分的流程是什么?
-
Four steps for C: preprocessing, compiling, assembling, linking
compile code 有哪 4 步?
-
- Feb 2022
-
www.interviewbit.com www.interviewbit.com
-
Online C++ Compiler
InterviewBit provides us with one of the best C++ compilers that is easily operated and that supports multiple programming languages.
Tags
Annotators
URL
-
- Jan 2022
-
alyssaq.github.io alyssaq.github.io
-
Complexity table STL
Tags
Annotators
URL
-
-
users.cs.northwestern.edu users.cs.northwestern.edu
-
STL Summary
-
-
marvin.cs.uidaho.edu marvin.cs.uidaho.edu
-
Bitwise Hacks - No BS
-
-
programming.guide programming.guide
-
Collision reduction in Hash Tables : Open Addressing
-
-
highlyscalable.wordpress.com highlyscalable.wordpress.com
-
en.wikipedia.org en.wikipedia.org
Tags
Annotators
URL
-
-
en.cppreference.com en.cppreference.com
-
Containers library From cppreference.com < cpp
Detailed overview of stl containers
Tags
Annotators
URL
-
-
www.hackerearth.com www.hackerearth.com
-
Quick summary of stl
-
- Nov 2021
-
www.figma.com www.figma.com
-
asm.js subset is basically JavaScript where you can only use numbers (no strings, objects, etc.). This is all you need to run C++ code since everything in C++ is either a number or a pointer to a number, and pointers are also numbers. The C++ address space is just a giant JavaScript array of numbers and pointers are just indices into that array.
everything in C++ is either a number or a pointer to a number, and pointers are also numbers.
-
Because our product is written in C++, which can easily be compiled into WebAssembly, Figma is a perfect demonstration of this new format’s power.
Figma is written in C++, which can easily be compiled into WebAssembly
Tags
Annotators
URL
-
-
www.cnblogs.com www.cnblogs.com
-
A namespace is a scope.C++ provides namespaces to prevent name conflicts.
namespace 有什么作用?
Tags
Annotators
URL
-
-
www.learncpp.com www.learncpp.com
-
But the other effect of unnamed namespaces is that all identifiers inside an unnamed namespace are treated as if they had internal linkage, which means that the content of an unnamed namespace can’t be seen outside of the file in which the unnamed namespace is defined.
unnamed namespace 有什么作用?
-
-
www.learncpp.com www.learncpp.com
-
One of the best things about classes is that they contain destructors that automatically get executed when an object of the class goes out of scope. So if you allocate (or acquire) memory in your constructor, you can deallocate it in your destructor, and be guaranteed that the memory will be deallocated when the class object is destroyed (regardless of whether it goes out of scope, gets explicitly deleted, etc…).
smart pointer 的原理是什么?
-
- Apr 2020
-
accessmedicine.mhmedical.com accessmedicine.mhmedical.com
-
Sedation, osmotic diuresis, paralysis, ventricular drainage, and barbiturate coma are used in sequence, with coma induction being the last resort.
-
Cerebral perfusion pressure (CPP) is equal to the mean arterial pressure minus the ICP, with a target range of >60 mmHg.
-
CPP can be increased by either lowering ICP or raising mean arterial pressure.
-
- May 2017
-
thbecker.net thbecker.net
-
If you succeeded in not throwing exceptions from your overloads, then make sure to advertise that fact using the new noexcept keyword.
好的习惯
-
-
thbecker.net thbecker.net
-
Base(rhs) // wrong: rhs is an lvalue
这里要记住,很容易犯错,关键还是理解 it has a name rule
-
- Dec 2016
-
wiki.ros.org wiki.ros.org
-
RAII-style
对象构建时创建资源,区别于MFC那种显示调用init
Tags
Annotators
URL
-
- Aug 2016
-
en.wikibooks.org en.wikibooks.org
-
return reinterpret_cast<T *>(& const_cast<char&>(reinterpret_cast<const volatile char &>(v)))
核心思想是转化为char, 然后取地址
Tags
Annotators
URL
-
-
en.wikibooks.org en.wikibooks.org
-
Turing complete.
what does this mean ?
-
- Jun 2016
-
en.wikipedia.org en.wikipedia.org
-
given dispatch table offset
父类和子类的虚函数,offset一样
Tags
Annotators
URL
-