Click here to Skip to main content
13,405,725 members (51,826 online)

C / C++ / MFC

 
GeneralRe: Problem with string conversion Pin
Jochen Arndt22-Nov-12 3:52
memberJochen Arndt22-Nov-12 3:52 
QuestionHow to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha19-Nov-12 17:43
memberrahul.kulshreshtha19-Nov-12 17:43 
AnswerRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan19-Nov-12 23:50
mvpRichard MacCutchan19-Nov-12 23:50 
GeneralRe: How to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha20-Nov-12 0:22
memberrahul.kulshreshtha20-Nov-12 0:22 
GeneralRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan20-Nov-12 1:02
mvpRichard MacCutchan20-Nov-12 1:02 
GeneralRe: How to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha20-Nov-12 17:30
memberrahul.kulshreshtha20-Nov-12 17:30 
GeneralRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan20-Nov-12 22:17
mvpRichard MacCutchan20-Nov-12 22:17 
QuestionLinked Lists and unique_ptr's Pin
Tom Moore19-Nov-12 8:29
memberTom Moore19-Nov-12 8:29 
Hi, its been a while since I've used CodeProject.

Quick Question.

I'm training myself on standard algorithms and trying to create a linked list.

In Java it's easy.
class Node{
   public int data;
   public Node next;
   public Node(int val){ data= val; next = null;}
}


In the C++ Pre Ox11 you could use raw pointers.
struct Node{
  int data;
  Node* next;
  
  Node(int val):data(val),next(0){}
}


but you had to new up your next node and delete it afterwards.

With the new version of C++, you can use unique_ptr.

But if I try to use that, I can't seem to get a good node to next.

struct node{
  int data;
  unique_ptr<node> next;

  node(int al):data(val),next(nullptr){}
}
  node a(3);
  node b(4);
  a.next = b; // Error
  a.next = move(b); // Error
  a.next.reset (b); // Error


Please could you enlighten me, on how I can get this to work.

Many Thanks
Tom
AnswerRe: Linked Lists and unique_ptr's Pin
Eugen Podsypalnikov19-Nov-12 11:50
memberEugen Podsypalnikov19-Nov-12 11:50 
AnswerRe: Linked Lists and unique_ptr's Pin
Chris Meech19-Nov-12 15:04
memberChris Meech19-Nov-12 15:04 
Questionencrypt and decrypt Pin
thandy mitchell19-Nov-12 7:24
memberthandy mitchell19-Nov-12 7:24 
AnswerRe: encrypt and decrypt Pin
Richard MacCutchan19-Nov-12 8:59
mvpRichard MacCutchan19-Nov-12 8:59 
AnswerRe: encrypt and decrypt Pin
CPallini19-Nov-12 12:36
mvpCPallini19-Nov-12 12:36 
Questionaccess excel data using c++ Pin
lakshmamma19-Nov-12 3:05
memberlakshmamma19-Nov-12 3:05 
AnswerRe: access excel data using c++ Pin
Flaviu219-Nov-12 3:14
memberFlaviu219-Nov-12 3:14 
AnswerRe: access excel data using c++ Pin
CPallini19-Nov-12 3:17
mvpCPallini19-Nov-12 3:17 
AnswerRe: access excel data using c++ Pin
Jochen Arndt19-Nov-12 3:26
memberJochen Arndt19-Nov-12 3:26 
QuestionScroll window after zoom Pin
Flaviu218-Nov-12 23:11
memberFlaviu218-Nov-12 23:11 
QuestionPre commit hooks for svn Pin
Mukul_P18-Nov-12 18:41
memberMukul_P18-Nov-12 18:41 
AnswerRe: Pre commit hooks for svn Pin
Richard MacCutchan18-Nov-12 22:42
mvpRichard MacCutchan18-Nov-12 22:42 
AnswerRe: Pre commit hooks for svn Pin
April Fans22-Dec-12 22:07
memberApril Fans22-Dec-12 22:07 
QuestionC++, RealTime Scheduler in Operating System Pin
Kevin Stlip17-Nov-12 17:10
memberKevin Stlip17-Nov-12 17:10 
AnswerRe: C++, RealTime Scheduler in Operating System Pin
Richard MacCutchan17-Nov-12 22:46
mvpRichard MacCutchan17-Nov-12 22:46 
Questionporting my device driver 32 bit to windows 7 64 bit Pin
navn199116-Nov-12 23:03
membernavn199116-Nov-12 23:03 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit Pin
jschell17-Nov-12 6:52
memberjschell17-Nov-12 6:52 

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.


Advertise | Privacy |
Web01 | 2.8.180221.1 | Last Updated 22 Feb 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid