Click here to Skip to main content
16,005,162 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Generaljpg image Pin
kenloverboy5-Aug-05 4:13
kenloverboy5-Aug-05 4:13 
GeneralRe: jpg image Pin
Anonymous5-Aug-05 13:46
Anonymous5-Aug-05 13:46 
Questionform->show () problem??? Pin
richiemac4-Aug-05 23:30
richiemac4-Aug-05 23:30 
AnswerRe: form->show () problem??? Pin
richiemac5-Aug-05 3:27
richiemac5-Aug-05 3:27 
GeneralC++ Question Pin
DiscoBall 133-Aug-05 10:36
DiscoBall 133-Aug-05 10:36 
GeneralRe: C++ Question Pin
koothkeeper3-Aug-05 11:13
professionalkoothkeeper3-Aug-05 11:13 
GeneralRe: C++ Question Pin
toxcct3-Aug-05 22:22
toxcct3-Aug-05 22:22 
GeneralRe: C++ Question Pin
Anonymous4-Aug-05 8:23
Anonymous4-Aug-05 8:23 
Not quite. That would be:
<br />
// 50 new pointers to integers.<br />
int **a = new (int *)[50];    // Parentheses might not be necessary.<br />
<br />
int *b = a[0]; // Assign one element of the array to an int pointer.<br />
<br />
int c = 0; // New integer on the stack<br />
<br />
b = &c; // Assign a value to the pointer.<br />
<br />
a[0] = &c; // Same effect as the above line.<br />
<br />
*b = 5; // Assign a value to the integer pointed to by b.<br />
<br />
*(a[0]) = 5; // Same effect as the above line.<br />


(Note: I wrote this code in the input box and didn't compile it to double-check if it works, so if I got something wrong please correct me.)

Like the other posters said, the code "int *a = new int[50]" allocates an array of 50 integers on the heap and assigns a to the address of the beginning of that array.
GeneralRe: C++ Question Pin
DiscoBall134-Aug-05 16:30
sussDiscoBall134-Aug-05 16:30 
GeneralArray Pointer math Pin
mikesys3-Aug-05 9:39
mikesys3-Aug-05 9:39 
GeneralRe: Array Pointer math Pin
Christian Graus3-Aug-05 13:24
protectorChristian Graus3-Aug-05 13:24 
GeneralRe: Array Pointer math Pin
Anonymous3-Aug-05 14:23
Anonymous3-Aug-05 14:23 
GeneralRe: Array Pointer math Pin
Christian Graus3-Aug-05 14:30
protectorChristian Graus3-Aug-05 14:30 
Question.resX file question?? Pin
richiemac2-Aug-05 23:21
richiemac2-Aug-05 23:21 
AnswerRe: .resX file question?? Pin
ursus zeta7-Aug-05 10:11
ursus zeta7-Aug-05 10:11 
GeneralRe: .resX file question?? Pin
richiemac7-Aug-05 21:54
richiemac7-Aug-05 21:54 
GeneralUsing C++ libraries in C application Pin
lata07mahi2-Aug-05 2:07
lata07mahi2-Aug-05 2:07 
GeneralRe: Using C++ libraries in C application Pin
Nemanja Trifunovic2-Aug-05 2:55
Nemanja Trifunovic2-Aug-05 2:55 
Questionhow to write an avi file Pin
limra1-Aug-05 22:07
limra1-Aug-05 22:07 
AnswerRe: how to write an avi file Pin
ursus zeta2-Aug-05 9:19
ursus zeta2-Aug-05 9:19 
Generalplaying sound in C++ Pin
snibster1-Aug-05 4:14
snibster1-Aug-05 4:14 
GeneralRe: playing sound in C++ Pin
Anonymous1-Aug-05 7:09
Anonymous1-Aug-05 7:09 
GeneralRe: playing sound in C++ Pin
Laffis5-Aug-05 2:43
Laffis5-Aug-05 2:43 
GeneralRe: playing sound in C++ Pin
Laffis5-Aug-05 1:13
Laffis5-Aug-05 1:13 
GeneralSpecialization for ref classes Pin
S. Senthil Kumar31-Jul-05 8:45
S. Senthil Kumar31-Jul-05 8:45 

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.