Click here to Skip to main content
       

C / C++ / MFC

 
AnswerRe: Check if a character is lowercase and change to uppercase. Pinmembersajeesh.c20-Nov-12 17:34 
GeneralRe: Check if a character is lowercase and change to uppercase. PinmvpRichard MacCutchan20-Nov-12 21:31 
QuestionIs it possible to capture an HD video/ to generate videos in HD in C++/VC++/MFC.? Pinmembermbatra3119-Nov-12 22:15 
QuestionProblem with string conversion PinmemberHungryCPPDev19-Nov-12 19:08 
AnswerRe: Problem with string conversion PinmemberJochen Arndt19-Nov-12 21:40 
GeneralRe: Problem with string conversion [modified] PinmemberHungryCPPDev20-Nov-12 18:05 
GeneralRe: Problem with string conversion PinmemberJochen Arndt22-Nov-12 2:52 
QuestionHow to set the alignment of items of CListCtrl Pinmemberrahul.kulshreshtha19-Nov-12 16:43 
AnswerRe: How to set the alignment of items of CListCtrl PinmvpRichard MacCutchan19-Nov-12 22:50 
GeneralRe: How to set the alignment of items of CListCtrl Pinmemberrahul.kulshreshtha19-Nov-12 23:22 
GeneralRe: How to set the alignment of items of CListCtrl PinmvpRichard MacCutchan20-Nov-12 0:02 
GeneralRe: How to set the alignment of items of CListCtrl Pinmemberrahul.kulshreshtha20-Nov-12 16:30 
GeneralRe: How to set the alignment of items of CListCtrl PinmvpRichard MacCutchan20-Nov-12 21:17 
QuestionLinked Lists and unique_ptr's PinmemberTom Moore19-Nov-12 7: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 [modified] PinmemberEugen Podsypalnikov19-Nov-12 10:50 
AnswerRe: Linked Lists and unique_ptr's PinmemberChris Meech19-Nov-12 14:04 
Questionencrypt and decrypt Pinmemberthandy mitchell19-Nov-12 6:24 
AnswerRe: encrypt and decrypt PinmvpRichard MacCutchan19-Nov-12 7:59 
AnswerRe: encrypt and decrypt PinmvpCPallini19-Nov-12 11:36 
Questionaccess excel data using c++ Pinmemberlakshmamma19-Nov-12 2:05 
AnswerRe: access excel data using c++ PinmemberFlaviu219-Nov-12 2:14 
AnswerRe: access excel data using c++ PinmvpCPallini19-Nov-12 2:17 
AnswerRe: access excel data using c++ PinmemberJochen Arndt19-Nov-12 2:26 
QuestionScroll window after zoom [modified] PinmemberFlaviu218-Nov-12 22:11 
AnswerMessage Removed PinmemberFlaviu218-Nov-12 22:18 
QuestionPre commit hooks for svn PinmemberMukul_P18-Nov-12 17:41 
AnswerRe: Pre commit hooks for svn PinmvpRichard MacCutchan18-Nov-12 21:42 
AnswerRe: Pre commit hooks for svn [modified] PinmemberApril Fans22-Dec-12 21:07 
QuestionC++, RealTime Scheduler in Operating System PinmemberKevin Stlip17-Nov-12 16:10 
AnswerRe: C++, RealTime Scheduler in Operating System PinmvpRichard MacCutchan17-Nov-12 21:46 
Questionporting my device driver 32 bit to windows 7 64 bit Pinmembernavn199116-Nov-12 22:03 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit Pinmemberjschell17-Nov-12 5:52 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit PinmemberBilliousBob23-Nov-12 4:50 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit PinmemberClark Kent SuperCoder17-Nov-12 5:52 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pinmembernavn199118-Nov-12 21:54 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit PinmemberClark Kent SuperCoder19-Nov-12 0:15 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pinmembernavn199121-Nov-12 2:40 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit PinmemberBilliousBob23-Nov-12 4:51 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit PinmemberBilliousBob23-Nov-12 4:50 
QuestionMemory usage Pinmemberjohn563215-Nov-12 21:48 
AnswerRe: Memory usage PinmemberOrjan Westin15-Nov-12 23:23 
AnswerRe: Memory usage PinmemberDavidCrow16-Nov-12 2:27 
AnswerRe: Memory usage PinmemberRolf Kristensen16-Nov-12 3:30 
AnswerRe: Memory usage PinmemberArun S J18-Nov-12 18:13 
Questioninterp project in 64bit system PinmemberDang Vu Tuan15-Nov-12 21:46 
AnswerRe: interp project in 64bit system PinmvpRichard MacCutchan15-Nov-12 23:57 
QuestionSql server Database BackUp Pinmembershibashish mohanty15-Nov-12 20:06 
AnswerRe: Sql server Database BackUp PinmvpRichard MacCutchan15-Nov-12 23:55 
AnswerRe: Sql server Database BackUp PinmemberAndré Kraak16-Nov-12 0:48 
QuestionNeed help compiling PinmemberxLeonx15-Nov-12 8:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web04 | 2.8.140926.1 | Last Updated 30 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid