Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how can I Create an Office plugin? Pin
ThiefXXX11-Sep-05 11:34
ThiefXXX11-Sep-05 11:34 
QuestionWebbrowser Pin
RaymondM11-Sep-05 9:15
RaymondM11-Sep-05 9:15 
QuestionC++ question Pin
Sveta8011-Sep-05 7:44
Sveta8011-Sep-05 7:44 
AnswerRe: C++ question Pin
Nemanja Trifunovic11-Sep-05 7:59
Nemanja Trifunovic11-Sep-05 7:59 
AnswerRe: C++ question Pin
PJ Arends11-Sep-05 9:52
professionalPJ Arends11-Sep-05 9:52 
GeneralRe: C++ question Pin
Sveta8011-Sep-05 10:36
Sveta8011-Sep-05 10:36 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 12:09
mvaMarc Clifton11-Sep-05 12:09 
GeneralRe: C++ question Pin
PJ Arends11-Sep-05 12:35
professionalPJ Arends11-Sep-05 12:35 
I did say "the basic technique" not "the code" and the code was supplied as an example only.

The memory was allocated with new not malloc so I could not tell a begginer to use realloc on that pointer. int does not have a d'tor so they are not a problem.

The OP is a beginner, he asked about how to allocate a dynamic array when he did not know the size ahead of time. The example code I provided is a very simple way to do it that should be very clear to a beginner. I could have posted the code used by std::vector (or told him to read the vector header file) which you would have had a harder time criticizing, but it would not be very helpful as an example. Or were you so good at coding when you started that you took all those kind of things into consideration when you first learned about arrays and linked lists etc? No? I didn't think so.







"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04

"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05

Within you lies the power for good - Use it!
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 13:48
mvaMarc Clifton11-Sep-05 13:48 
GeneralRe: C++ question Pin
PJ Arends11-Sep-05 19:28
professionalPJ Arends11-Sep-05 19:28 
GeneralRe: C++ question Pin
Christian Graus11-Sep-05 12:46
protectorChristian Graus11-Sep-05 12:46 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 13:49
mvaMarc Clifton11-Sep-05 13:49 
GeneralRe: C++ question Pin
Christian Graus11-Sep-05 13:53
protectorChristian Graus11-Sep-05 13:53 
GeneralRe: C++ question Pin
Nemanja Trifunovic12-Sep-05 2:26
Nemanja Trifunovic12-Sep-05 2:26 
GeneralRe: C++ question Pin
Nemanja Trifunovic12-Sep-05 2:30
Nemanja Trifunovic12-Sep-05 2:30 
GeneralC++ question Pin
Sveta8011-Sep-05 7:32
Sveta8011-Sep-05 7:32 
GeneralRe: C++ question Pin
Trollslayer11-Sep-05 7:42
mentorTrollslayer11-Sep-05 7:42 
GeneralRe: C++ question Pin
El Corazon11-Sep-05 7:55
El Corazon11-Sep-05 7:55 
GeneralRe: C++ question Pin
Trollslayer11-Sep-05 13:53
mentorTrollslayer11-Sep-05 13:53 
GeneralRe: C++ question Pin
Blake Miller12-Sep-05 4:38
Blake Miller12-Sep-05 4:38 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 8:03
mvaMarc Clifton11-Sep-05 8:03 
GeneralRe: C++ question Pin
DavidNohejl11-Sep-05 8:09
DavidNohejl11-Sep-05 8:09 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 8:12
mvaMarc Clifton11-Sep-05 8:12 
GeneralRe: C++ question Pin
DavidNohejl11-Sep-05 8:15
DavidNohejl11-Sep-05 8:15 
GeneralRe: C++ question Pin
Marc Clifton11-Sep-05 8:06
mvaMarc Clifton11-Sep-05 8:06 

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.