Click here to Skip to main content
15,914,323 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ListBox SDI SetFont Pin
Mark Salsbery1-Apr-08 19:22
Mark Salsbery1-Apr-08 19:22 
GeneralRe: ListBox SDI SetFont Pin
Hamid_RT7-Apr-08 3:37
Hamid_RT7-Apr-08 3:37 
Generalauto_ptr array Pin
George_George1-Apr-08 0:50
George_George1-Apr-08 0:50 
GeneralRe: auto_ptr array Pin
_AnsHUMAN_ 1-Apr-08 0:59
_AnsHUMAN_ 1-Apr-08 0:59 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 1:41
George_George1-Apr-08 1:41 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 1:55
mveCPallini1-Apr-08 1:55 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 2:03
George_George1-Apr-08 2:03 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 2:17
mveCPallini1-Apr-08 2:17 
George_George wrote:
I am confused. We are talking about destructor of auto_ptr? Why do you say "allocates"?? Could you provide more description please?

I report below _AnShUmAn_ code for reference.
auto_ptr<int> p(new int(10)); 

In the above expression, the new operator allocates one int and initialise it with the number 10.



George_George wrote:
No, I have compile errors in MSVC 2008.


Well, I have VS2005, and no errors here. However I've to admit I overlooked the following (serious) warning:
warning C4156: deletion of an array expression without using the array form of 'delete'; array form substituted
[...].

Smile | :)

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


GeneralRe: auto_ptr array Pin
George_George1-Apr-08 2:22
George_George1-Apr-08 2:22 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 2:28
mveCPallini1-Apr-08 2:28 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 2:54
George_George1-Apr-08 2:54 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 3:01
mveCPallini1-Apr-08 3:01 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 3:16
George_George1-Apr-08 3:16 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 4:09
mveCPallini1-Apr-08 4:09 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 4:19
George_George1-Apr-08 4:19 
GeneralRe: auto_ptr array Pin
led mike1-Apr-08 4:24
led mike1-Apr-08 4:24 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 4:37
George_George1-Apr-08 4:37 
GeneralRe: auto_ptr array Pin
led mike1-Apr-08 5:07
led mike1-Apr-08 5:07 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 19:38
George_George1-Apr-08 19:38 
GeneralRe: auto_ptr array Pin
led mike2-Apr-08 5:01
led mike2-Apr-08 5:01 
GeneralRe: auto_ptr array Pin
George_George2-Apr-08 23:38
George_George2-Apr-08 23:38 
JokeRe: auto_ptr array Pin
Cedric Moonen1-Apr-08 4:40
Cedric Moonen1-Apr-08 4:40 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 19:40
George_George1-Apr-08 19:40 
GeneralRe: auto_ptr array [modified] Pin
CPallini1-Apr-08 4:47
mveCPallini1-Apr-08 4:47 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 19:37
George_George1-Apr-08 19:37 

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.