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

Managed C++/CLI

 
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 
GeneralRe: Having problems with an array of objects Pin
Mark Salsbery24-Jul-07 11:37
Mark Salsbery24-Jul-07 11:37 
I'm not sure what value (pun intended) you're getting out of using a value struct here, since
you're not creating heap objects and they need to be initialized.

Beyond that, compare the following with your code. Most of the changes were regular C++
related...

ref class CWafer
{
public:
CWafer();

value struct MyStruct
{
int AnIntegerValue;
array<Int32>^ AnArrayOfIntegers;
void Init()
{
AnArrayOfIntegers = gcnew array<Int32>(10);
}
};
array<MyStruct, 2>^ TwoDimensionalArray;
MyStruct newStruct;
};

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

for (int i = 0; i < 1000; ++i)
{
for (int j = 0; j < 1000; ++j)
{
TwoDimensionalArray[i,j].Init();
}
}

newStruct.Init();
}

Mark


Mark Salsbery
Microsoft MVP - Visual C++

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 
QuestionMixed C++ won't invoke JIT Pin
anthonym723-Jul-07 8:45
anthonym723-Jul-07 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.