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

C / C++ / MFC

 
QuestionHow to get CPU temperature. Pin
Max++5-Oct-07 16:59
Max++5-Oct-07 16:59 
AnswerRe: How to get CPU temperature. Pin
aquawicket5-Oct-07 17:03
aquawicket5-Oct-07 17:03 
AnswerRe: How to get CPU temperature. Pin
Hamid_RT5-Oct-07 18:51
Hamid_RT5-Oct-07 18:51 
QuestionResizing a dynamic pointer array Pin
aquawicket5-Oct-07 16:56
aquawicket5-Oct-07 16:56 
AnswerRe: Resizing a dynamic pointer array Pin
Karismatic5-Oct-07 19:43
Karismatic5-Oct-07 19:43 
AnswerRe: Resizing a dynamic pointer array Pin
John R. Shaw6-Oct-07 1:42
John R. Shaw6-Oct-07 1:42 
GeneralRe: Resizing a dynamic pointer array Pin
aquawicket6-Oct-07 8:05
aquawicket6-Oct-07 8:05 
GeneralRe: Resizing a dynamic pointer array Pin
John R. Shaw6-Oct-07 12:46
John R. Shaw6-Oct-07 12:46 
Yes, that is the idea; short and simple. The only thing I would change in the example is the assignment to NULL, because you immediately assign a value to it after the declaration.

number* n = new number[2]; // declare and assign in one shot<br />
number* temp = new number[4];


Those are shorter and make more since to me.

P.S. The register keyword is unneeded, because most modern compilers are better at picking register variables than we are and it is free to ignore the suggestion, which is all that keyword is.

Good Luck!


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

QuestionHow do you get the ScrollBar Width Pin
littleGreenDude5-Oct-07 10:12
littleGreenDude5-Oct-07 10:12 
AnswerRe: How do you get the ScrollBar Width Pin
Mark Salsbery5-Oct-07 12:16
Mark Salsbery5-Oct-07 12:16 
Questionwhat is ENSURE_THROW? [modified] Pin
DreamMengJian5-Oct-07 6:25
DreamMengJian5-Oct-07 6:25 
QuestionShowWindow Command Problems Pin
Beaon5-Oct-07 6:02
Beaon5-Oct-07 6:02 
AnswerRe: ShowWindow Command Problems Pin
IMNOOPR5-Oct-07 6:22
IMNOOPR5-Oct-07 6:22 
GeneralRe: ShowWindow Command Problems Pin
Beaon5-Oct-07 7:14
Beaon5-Oct-07 7:14 
QuestionRe: ShowWindow Command Problems Pin
Mark Salsbery5-Oct-07 7:48
Mark Salsbery5-Oct-07 7:48 
AnswerRe: ShowWindow Command Problems Pin
Beaon5-Oct-07 8:06
Beaon5-Oct-07 8:06 
GeneralRe: ShowWindow Command Problems Pin
Mark Salsbery5-Oct-07 8:11
Mark Salsbery5-Oct-07 8:11 
GeneralRe: ShowWindow Command Problems Pin
Beaon5-Oct-07 8:31
Beaon5-Oct-07 8:31 
GeneralRe: ShowWindow Command Problems Pin
Mark Salsbery5-Oct-07 9:50
Mark Salsbery5-Oct-07 9:50 
GeneralRe: ShowWindow Command Problems Pin
Beaon5-Oct-07 10:57
Beaon5-Oct-07 10:57 
GeneralRe: ShowWindow Command Problems Pin
David Crow6-Oct-07 3:35
David Crow6-Oct-07 3:35 
GeneralRe: ShowWindow Command Problems Pin
Beaon7-Oct-07 8:36
Beaon7-Oct-07 8:36 
AnswerRe: ShowWindow Command Problems [modified] Pin
Beaon8-Oct-07 3:31
Beaon8-Oct-07 3:31 
AnswerRe: ShowWindow Command Problems Pin
David Crow5-Oct-07 8:02
David Crow5-Oct-07 8:02 
GeneralRe: ShowWindow Command Problems Pin
Beaon5-Oct-07 8:20
Beaon5-Oct-07 8:20 

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.