Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Prevent Windows From Entering Hibernate Mode Pin
Rishav Prabhakar14-Dec-11 20:14
Rishav Prabhakar14-Dec-11 20:14 
AnswerRe: Prevent Windows From Entering Hibernate Mode Pin
Randor 14-Dec-11 10:19
professional Randor 14-Dec-11 10:19 
GeneralRe: Prevent Windows From Entering Hibernate Mode Pin
Rishav Prabhakar14-Dec-11 20:39
Rishav Prabhakar14-Dec-11 20:39 
GeneralRe: Prevent Windows From Entering Hibernate Mode Pin
Chris Losinger15-Dec-11 5:59
professionalChris Losinger15-Dec-11 5:59 
AnswerRe: Prevent Windows From Entering Hibernate Mode Pin
jeff616-Dec-11 23:24
jeff616-Dec-11 23:24 
Questionabout change array length Pin
desatir731613-Dec-11 21:02
desatir731613-Dec-11 21:02 
AnswerRe: about change array length Pin
Richard MacCutchan13-Dec-11 22:15
mveRichard MacCutchan13-Dec-11 22:15 
AnswerRe: about change array length Pin
CPallini14-Dec-11 1:57
mveCPallini14-Dec-11 1:57 
In C programming language:
If you allocate the array on the stack then you cannot change its size.
On the other hand, if you allocate an array on the heap (using, for instance malloc) then you may change the size calling realloc.

All the above rules hold for C++. However you usually use the new operator for allocating arrays on the heap and new lacks of a reallocating mechanism. Anyway C++ provides, via the STL library, containers[^] that take care about memory reallocation.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

JokeRe: about change array length Pin
Randor 14-Dec-11 10:31
professional Randor 14-Dec-11 10:31 
GeneralRe: about change array length Pin
CPallini14-Dec-11 11:44
mveCPallini14-Dec-11 11:44 
AnswerRe: about change array length Pin
David Crow14-Dec-11 3:27
David Crow14-Dec-11 3:27 
GeneralRe: about change array length Pin
CPallini14-Dec-11 11:43
mveCPallini14-Dec-11 11:43 
AnswerRe: about change array length Pin
szpillka15-Dec-11 5:32
szpillka15-Dec-11 5:32 
QuestionA quastion in programming language desing' scope Pin
desatir731613-Dec-11 20:43
desatir731613-Dec-11 20:43 
AnswerRe: A quastion in programming language desing' scope Pin
Orjan Westin14-Dec-11 0:05
professionalOrjan Westin14-Dec-11 0:05 
GeneralRe: A quastion in programming language desing' scope Pin
David Crow14-Dec-11 3:32
David Crow14-Dec-11 3:32 
Questionwhat is the result(union & structure)? Pin
desatir731613-Dec-11 20:32
desatir731613-Dec-11 20:32 
AnswerRe: what is the result(union & structure)? Pin
Richard MacCutchan13-Dec-11 22:13
mveRichard MacCutchan13-Dec-11 22:13 
AnswerRe: what is the result(union & structure)? Pin
CPallini14-Dec-11 2:33
mveCPallini14-Dec-11 2:33 
GeneralRe: what is the result(union & structure)? Pin
Richard MacCutchan14-Dec-11 2:40
mveRichard MacCutchan14-Dec-11 2:40 
GeneralRe: what is the result(union & structure)? Pin
CPallini14-Dec-11 2:42
mveCPallini14-Dec-11 2:42 
AnswerRe: what is the result(union & structure)? Pin
Stefan_Lang14-Dec-11 5:34
Stefan_Lang14-Dec-11 5:34 
GeneralRe: what is the result(union & structure)? Pin
CPallini15-Dec-11 10:10
mveCPallini15-Dec-11 10:10 
QuestionHow to Convert vector::reference to vector::iterator ? Pin
002comp13-Dec-11 20:21
002comp13-Dec-11 20:21 
AnswerRe: How to Convert vector::reference to vector::iterator ? Pin
Chris Losinger14-Dec-11 2:22
professionalChris Losinger14-Dec-11 2:22 

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.