Click here to Skip to main content
15,925,309 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Dunamic type converstion. Please help? Pin
RichardS18-Sep-05 14:35
RichardS18-Sep-05 14:35 
GeneralRe: Dunamic type converstion. Please help? Pin
LiquidE_SA18-Sep-05 14:59
LiquidE_SA18-Sep-05 14:59 
Questioncan we declare destructor of a class as private? (C++) Pin
Anonymous17-Sep-05 12:42
Anonymous17-Sep-05 12:42 
AnswerRe: can we declare destructor of a class as private? (C++) Pin
Johann Gerell17-Sep-05 13:10
Johann Gerell17-Sep-05 13:10 
GeneralRe: can we declare destructor of a class as private? (C++) Pin
BlitzPackage17-Sep-05 13:57
BlitzPackage17-Sep-05 13:57 
AnswerRe: can we declare destructor of a class as private? (C++) Pin
Alexander M.,18-Sep-05 3:42
Alexander M.,18-Sep-05 3:42 
QuestionC/C++ Question Pin
Rajesh_K_Sharma17-Sep-05 7:05
Rajesh_K_Sharma17-Sep-05 7:05 
AnswerRe: C/C++ Question Pin
John M. Drescher17-Sep-05 8:31
John M. Drescher17-Sep-05 8:31 
GeneralRe: C/C++ Question Pin
RichardS17-Sep-05 16:47
RichardS17-Sep-05 16:47 
QuestionQuestion About Pointers in C++ Pin
17-Sep-05 5:54
suss17-Sep-05 5:54 
AnswerRe: Question About Pointers in C++ Pin
TheGreatAndPowerfulOz17-Sep-05 15:03
TheGreatAndPowerfulOz17-Sep-05 15:03 
GeneralRe: Question About Pointers in C++ Pin
BlitzPackage17-Sep-05 15:35
BlitzPackage17-Sep-05 15:35 
GeneralRe: Question About Pointers in C++ Pin
Achim Klein17-Sep-05 15:42
Achim Klein17-Sep-05 15:42 
GeneralRe: Question About Pointers in C++ Pin
BlitzPackage17-Sep-05 15:46
BlitzPackage17-Sep-05 15:46 
GeneralRe: Question About Pointers in C++ Pin
Achim Klein17-Sep-05 15:56
Achim Klein17-Sep-05 15:56 
GeneralRe: Question About Pointers in C++ Pin
RichardS17-Sep-05 17:31
RichardS17-Sep-05 17:31 
GeneralRe: Question About Pointers in C++ Pin
Achim Klein18-Sep-05 1:41
Achim Klein18-Sep-05 1:41 
AnswerRe: Question About Pointers in C++ Pin
Achim Klein17-Sep-05 15:33
Achim Klein17-Sep-05 15:33 
GeneralRe: Question About Pointers in C++ Pin
BlitzPackage17-Sep-05 15:39
BlitzPackage17-Sep-05 15:39 
GeneralRe: Question About Pointers in C++ Pin
Johann Gerell17-Sep-05 19:24
Johann Gerell17-Sep-05 19:24 
GeneralRe: Question About Pointers in C++ Pin
Achim Klein18-Sep-05 1:50
Achim Klein18-Sep-05 1:50 
AnswerRe: Question About Pointers in C++ Pin
Johann Gerell17-Sep-05 19:48
Johann Gerell17-Sep-05 19:48 
The basic thing to remember about a pointer of type A* is that it either points at nothing (NULL) or to a memory address where a chunk of memory resides which size is an even multiple of sizeof(A).

Imagine a part of the memory space, where an A[4] array resides and a pointer A* pA which points at the first of these As:
A chunkA[4];
A* pA = A; // Equal to A* pA = &A[0];
And this looks like:
| | | | | | |A|A|A|A| | | | | | | |
|_|_|_|_|_|_|0|1|2|3|_|_|_|_|_|_|_|

             ^
             | 
             |------------- pA
Now we can say
A a0 = *pA++; // (a)
A a1 = *pA++; // (b)
A a2 = *pA++; // (c)
A a3 = *pA;   // (d)
Stepping pA once more would take it outside the A[4]. Since we don't know what is there, we don't want to dereference pA if it points there, e.g.:
A a3 = *pA++
A a4 = *pA;
have small chances of resulting in expected behavior...

The expressions (a) - (d) will all invoke the copy constructor of A, which in the default case will invoke the copy constructor for all its members that have a copy constructor and make a binary copy of pod mebers that lack copy constructors. Ad infinitum. Sort of.


--
The Blog: Bits and Pieces
QuestionAfxGetThread returning NULL in Debug Mode and causing crash Pin
Anonymous16-Sep-05 17:46
Anonymous16-Sep-05 17:46 
QuestionPure virtual function calls in Constructor Pin
RichardS16-Sep-05 11:05
RichardS16-Sep-05 11:05 
AnswerRe: Pure virtual function calls in Constructor Pin
S. Senthil Kumar16-Sep-05 20:16
S. Senthil Kumar16-Sep-05 20:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.