Click here to Skip to main content
15,908,673 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: dynamic array Pin
Naveen24-Aug-08 23:38
Naveen24-Aug-08 23:38 
GeneralRe: dynamic array [modified] Pin
CPallini25-Aug-08 0:04
mveCPallini25-Aug-08 0:04 
GeneralRe: dynamic array Pin
Naveen25-Aug-08 0:09
Naveen25-Aug-08 0:09 
GeneralRe: dynamic array Pin
Jijo.Raj25-Aug-08 0:17
Jijo.Raj25-Aug-08 0:17 
GeneralRe: dynamic array Pin
Naveen25-Aug-08 0:59
Naveen25-Aug-08 0:59 
GeneralRe: dynamic array Pin
CPallini25-Aug-08 0:26
mveCPallini25-Aug-08 0:26 
AnswerRe: dynamic array Pin
Perspx24-Aug-08 23:45
Perspx24-Aug-08 23:45 
AnswerRe: dynamic array Pin
Jijo.Raj24-Aug-08 23:54
Jijo.Raj24-Aug-08 23:54 
Dynamic arrays means - you are free to allocate any number of members at runtime. But still you should specify the number of items in you dynamic array. The only flexibility is - you could decide the count at runtime where in static arrays, you cannot.

Sunday8PM wrote:
MyClass *MyObjects = new MyClass[];


You've to specify the array size.
int ArraySize = 10;
MyClass *MyObjects = new MyClass[ArraySize];


Sunday8PM wrote:
I'm worried that since I haven't specified the length of the array before, it might write over something else since it isn't expecting the array to use it.

You cannot instantiate arrays without specifying the size.

Well, you could use stl containers such as std::vector where you'll be free from the array size headache.

Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

GeneralRe: dynamic array Pin
Sunday8PM25-Aug-08 0:12
Sunday8PM25-Aug-08 0:12 
AnswerRe: dynamic array Pin
David Crow25-Aug-08 4:51
David Crow25-Aug-08 4:51 
AnswerRe: dynamic array Pin
erkanina8-Sep-08 10:02
erkanina8-Sep-08 10:02 
QuestionMerging two icons(transparent BitBlt) Pin
haimen24-Aug-08 23:13
haimen24-Aug-08 23:13 
Questioncompling file in the Debug build, but errors in the Release build. advice Pin
ptr_Electron24-Aug-08 23:01
ptr_Electron24-Aug-08 23:01 
AnswerRe: compling file in the Debug build, but errors in the Release build. advice Pin
CPallini24-Aug-08 23:22
mveCPallini24-Aug-08 23:22 
AnswerRe: compling file in the Debug build, but errors in the Release build. advice Pin
toxcct24-Aug-08 23:23
toxcct24-Aug-08 23:23 
GeneralRe: compling file in the Debug build, but errors in the Release build. advice Pin
santhoshv8425-Aug-08 0:19
santhoshv8425-Aug-08 0:19 
GeneralRe: compling file in the Debug build, but errors in the Release build. advice Pin
toxcct25-Aug-08 0:30
toxcct25-Aug-08 0:30 
AnswerRe: compling file in the Debug build, but errors in the Release build. advice Pin
Jijo.Raj25-Aug-08 1:09
Jijo.Raj25-Aug-08 1:09 
GeneralRe: compling file in the Debug build, but errors in the Release build. advice Pin
ptr_Electron25-Aug-08 1:26
ptr_Electron25-Aug-08 1:26 
QuestionRe: compling file in the Debug build, but errors in the Release build. advice Pin
Jijo.Raj25-Aug-08 1:40
Jijo.Raj25-Aug-08 1:40 
AnswerRe: compling file in the Debug build, but errors in the Release build. advice Pin
ptr_Electron25-Aug-08 1:53
ptr_Electron25-Aug-08 1:53 
QuestionSeparate Window Pin
T.RATHA KRISHNAN24-Aug-08 22:55
T.RATHA KRISHNAN24-Aug-08 22:55 
QuestionI feel it like a repost. Pin
CPallini24-Aug-08 22:58
mveCPallini24-Aug-08 22:58 
AnswerRe: I feel it like a repost. [modified] Pin
Perspx24-Aug-08 23:03
Perspx24-Aug-08 23:03 
QuestionRe: I feel it like a repost. Pin
T.RATHA KRISHNAN24-Aug-08 23:08
T.RATHA KRISHNAN24-Aug-08 23:08 

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.