cpp topics
(1)Difference between map and list (WIP)
(2) Find mid location in link list ?
(3) static variable and function in access register
(4) Auto and Shared Pointer
(5) Dimond Problem
(6) static cast and reinterpret cast4
(7) copy constructor with pointer
(8) Abract class and Vtable in absract class
(9) virtual keyword
================================
(1) virtual destructor
(2) What is smart pointer
Auto Pointer , Weak and Shared Pointer
(3) Differnce between union and Structure
(4) count length of number like 22344?
(5) Dangling Pointer and Wild Pointer
(7) Link list
(8) Multithreading -- shared pointer
(9) differnce between malloc and calloc
(10) this pointer
(11) class ,access specifier
(12) differnce refernce and pointer
(13) diff copy constuctor and assign operator
(14)diff copy constructor and assignment operator
(15) size of empty class
(16) what is initialization list
(17) object slicing
(18) class templet and function templet
(19) mutax and multimap
(20) vector .list ,map
(210 virtual function ,run type polymorphism , vPtr
(22)generic programming ,class templet and ,template
23) differnce between new and malloc
24) Insertion and extertion
25) Data operator
26) ?: conditional operator
27) type id operator
28) friend class
29) operator overlaoding
30) constructor and destructor
31) diff static and dynamic polymorphism
32)opps concept
33)Abstraction
34)possiblities of delete in c++
35) storage class
36) operator whic can not be overlaod
37) gitlab command
38) map and multimap
39) prefix operator overlaod
What is lazy initialization?
What is singletone design Pattern?
Define a class that has only one instance and provide a global point of access that instance. (single tone design pattern)
Requirement__(1) one and only one instance
(2) Global access
(3) No ownership
(4) Lazy initialization
Advantages_ (1) Save Memory--- and time
(2) Single access Point _ (1) Logger,database connection
(3) Flexibility --------Change anytime
(4) TheadPool
(5) Databases Appliction
(6)(configuration setting)-game setting,application
sttatic memeber function --static Gamesetting *_instance
if(insatnace ++NULL)
_instance =new GameSetting();
return instance;
class GameSetting //// Pointer * Gamestting
GameSetting *GameSetting::_instance=NULL;
//------------------------------------
Another example
class Singletone
static Singtone dataMember
default constructor is private;so instance can not be intatiated directly
Comments
Post a Comment