Click here to Skip to main content
15,440,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha19-Nov-12 16:43
Memberrahul.kulshreshtha19-Nov-12 16:43 
AnswerRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan19-Nov-12 22:50
mveRichard MacCutchan19-Nov-12 22:50 
GeneralRe: How to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha19-Nov-12 23:22
Memberrahul.kulshreshtha19-Nov-12 23:22 
GeneralRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan20-Nov-12 0:02
mveRichard MacCutchan20-Nov-12 0:02 
GeneralRe: How to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha20-Nov-12 16:30
Memberrahul.kulshreshtha20-Nov-12 16:30 
GeneralRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan20-Nov-12 21:17
mveRichard MacCutchan20-Nov-12 21:17 
QuestionLinked Lists and unique_ptr's Pin
Tom Moore19-Nov-12 7:29
MemberTom Moore19-Nov-12 7:29 
AnswerRe: Linked Lists and unique_ptr's Pin
Eugen Podsypalnikov19-Nov-12 10:50
MemberEugen Podsypalnikov19-Nov-12 10:50 
Hm... Try it Smile | :) :
C++
node a(3); // a, will be deleted as a stack variable
a.next = new node(4); // b, will be deleted by unique_ptr of a
a.next->next = new node(5); // c, will be deleted by unique_ptr of b
// 1. deleting of b, not "tested" :) :
a.next = move(a.next->next); // is there a crash ?
// 2. then deleting of b, old style :) :
unique_ptr<node> temp = move(a.next->next);
a.next = move(temp);


PS: any pre 0x11 C++ strcture or class may have a destructor as well :
C++
struct node {
  int m_iData;
  node* m_pNext;

  node(int iData) : m_iData(iData), m_pNext(NULL) {}
  ~node() { delete m_pNext; }

  node* detach() { node* prevNext(m_pNext); m_pNext = NULL; return prevNext; }
} a(3);

They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap. Smile | :)


modified 19-Nov-12 17:07pm.

AnswerRe: Linked Lists and unique_ptr's Pin
Chris Meech19-Nov-12 14:04
MemberChris Meech19-Nov-12 14:04 
Questionencrypt and decrypt Pin
thandy mitchell19-Nov-12 6:24
Memberthandy mitchell19-Nov-12 6:24 
AnswerRe: encrypt and decrypt Pin
Richard MacCutchan19-Nov-12 7:59
mveRichard MacCutchan19-Nov-12 7:59 
AnswerRe: encrypt and decrypt Pin
CPallini19-Nov-12 11:36
mveCPallini19-Nov-12 11:36 
Questionaccess excel data using c++ Pin
lakshmamma19-Nov-12 2:05
Memberlakshmamma19-Nov-12 2:05 
AnswerRe: access excel data using c++ Pin
_Flaviu19-Nov-12 2:14
Member_Flaviu19-Nov-12 2:14 
AnswerRe: access excel data using c++ Pin
CPallini19-Nov-12 2:17
mveCPallini19-Nov-12 2:17 
AnswerRe: access excel data using c++ Pin
Jochen Arndt19-Nov-12 2:26
professionalJochen Arndt19-Nov-12 2:26 
QuestionScroll window after zoom Pin
_Flaviu18-Nov-12 22:11
Member_Flaviu18-Nov-12 22:11 
QuestionPre commit hooks for svn Pin
Mukul_P18-Nov-12 17:41
MemberMukul_P18-Nov-12 17:41 
AnswerRe: Pre commit hooks for svn Pin
Richard MacCutchan18-Nov-12 21:42
mveRichard MacCutchan18-Nov-12 21:42 
AnswerRe: Pre commit hooks for svn Pin
April Fans22-Dec-12 21:07
MemberApril Fans22-Dec-12 21:07 
QuestionC++, RealTime Scheduler in Operating System Pin
Kevin Stlip17-Nov-12 16:10
MemberKevin Stlip17-Nov-12 16:10 
AnswerRe: C++, RealTime Scheduler in Operating System Pin
Richard MacCutchan17-Nov-12 21:46
mveRichard MacCutchan17-Nov-12 21:46 
Questionporting my device driver 32 bit to windows 7 64 bit Pin
navn199116-Nov-12 22:03
Membernavn199116-Nov-12 22:03 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit Pin
jschell17-Nov-12 5:52
Memberjschell17-Nov-12 5:52 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pin
WebMaster23-Nov-12 4:50
MemberWebMaster23-Nov-12 4:50 

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.