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

Managed C++/CLI

 
GeneralRe: Having problems with an array of objects Pin
Paul Conrad25-Jul-07 6:30
professionalPaul Conrad25-Jul-07 6:30 
GeneralRe: Having problems with an array of objects Pin
George L. Jackson24-Jul-07 15:31
George L. Jackson24-Jul-07 15:31 
GeneralRe: Having problems with an array of objects Pin
Mark Salsbery24-Jul-07 15:46
Mark Salsbery24-Jul-07 15:46 
GeneralRe: Having problems with an array of objects Pin
George L. Jackson24-Jul-07 15:45
George L. Jackson24-Jul-07 15:45 
AnswerRe: Having problems with an array of objects Pin
Mark Salsbery24-Jul-07 8:32
Mark Salsbery24-Jul-07 8:32 
GeneralRe: Having problems with an array of objects Pin
BuckBrown24-Jul-07 9:54
BuckBrown24-Jul-07 9:54 
GeneralRe: Having problems with an array of objects Pin
Mark Salsbery24-Jul-07 10:18
Mark Salsbery24-Jul-07 10:18 
GeneralRe: Having problems with an array of objects Pin
BuckBrown24-Jul-07 11:14
BuckBrown24-Jul-07 11:14 
I will attempt to make this bare bones.

ref class CWafer()
{
public:
CWafer(void);

value struct MyStruct
{
int AnIntegerValue;
array<int>^ AnArrayOfIntegers; // How do I define this to be an integer array of 10 ints.
Init()
{
AnArrayOfIntegers = gcnew array<int>(10) // I have tried this and it does not work.
}
};
array<MyStruct, 2>^ TwoDimensionalArray;
MyStruct newStruct;
}

CWafer::CWafer()
{
TwoDimensionalArray = gcnew array<MyStruct, 2>(1000, 1000);
newStruct = MyStruct.Init();
}

This is it! My application uses an x coordinate and a y coordinate, hence a two dimensional array is perfect because for each (x, y) location there are several integer values and integer arrays that need to be accessed. The above code snippet allows me to write "TwoDimensionalArray.AnIntegerValue = 1;" and I would like to be able to do something like write "TwoDimensionalArray.AnArrayOfIntegers[n] = 2;" but the array is undefined. It seems that the managed heap is being gabage collected before I can use it but I don't see anything wrong with the scope.
GeneralRe: Having problems with an array of objects Pin
Mark Salsbery24-Jul-07 11:37
Mark Salsbery24-Jul-07 11:37 
GeneralRe: Having problems with an array of objects Pin
BuckBrown24-Jul-07 12:15
BuckBrown24-Jul-07 12:15 
GeneralRe: Having problems with an array of objects Pin
Mark Salsbery24-Jul-07 12:49
Mark Salsbery24-Jul-07 12:49 
GeneralRe: Having problems with an array of objects Pin
BuckBrown25-Jul-07 6:43
BuckBrown25-Jul-07 6:43 
GeneralRe: Having problems with an array of objects Pin
Mark Salsbery24-Jul-07 11:47
Mark Salsbery24-Jul-07 11:47 
QuestionTo Setfocus to a control Pin
mikobi24-Jul-07 4:24
mikobi24-Jul-07 4:24 
AnswerRe: To Setfocus to a control Pin
led mike24-Jul-07 4:36
led mike24-Jul-07 4:36 
QuestionNative code step through goes out of sync Pin
originSH24-Jul-07 1:08
originSH24-Jul-07 1:08 
AnswerRe: Native code step through goes out of sync Pin
Bartosz Bien27-Jul-07 11:13
Bartosz Bien27-Jul-07 11:13 
Questionms office automation from NT service in 64 bit OS Pin
indra2023-Jul-07 20:39
indra2023-Jul-07 20:39 
AnswerRe: ms office automation from NT service in 64 bit OS Pin
Christian Graus23-Jul-07 20:46
protectorChristian Graus23-Jul-07 20:46 
GeneralRe: ms office automation from NT service in 64 bit OS Pin
indra2023-Jul-07 21:01
indra2023-Jul-07 21:01 
GeneralRe: ms office automation from NT service in 64 bit OS Pin
Christian Graus23-Jul-07 23:38
protectorChristian Graus23-Jul-07 23:38 
QuestionEliminate the Save As Dialog Box Pin
flias200123-Jul-07 8:56
flias200123-Jul-07 8:56 
AnswerRe: Eliminate the Save As Dialog Box Pin
Christian Graus23-Jul-07 19:29
protectorChristian Graus23-Jul-07 19:29 
Questiondifference between these directives Pin
andersod223-Jul-07 8:51
andersod223-Jul-07 8:51 
AnswerRe: difference between these directives Pin
Mark Salsbery23-Jul-07 10:09
Mark Salsbery23-Jul-07 10:09 

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.