add pointer in classes

add interfaces
This commit is contained in:
2025-09-23 12:42:50 +02:00
parent 89459f9cfc
commit 5894f4008e
10 changed files with 167 additions and 5 deletions
+14
View File
@@ -65,5 +65,19 @@ int main()
shared_ptr<int> pTmpSharedPointer2 = pNumber7.lock();
if (pTmpSharedPointer2 != nullptr) *pTmpSharedPointer2 = 10; // smart pointer are no guarantee for a valid object behind the pointer
// const exercise
// int *
// const int *
// int const *
// int * const
// const int * const
// int const * const
// const int const * const
// const int const const * const
// const int* pNumber = new int(0);
// *pNumber = 10; // is this working
// pNumber = new int(0); // is this working
return 0;
}