Click here to Skip to main content
15,900,511 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Database Drivers Pin
Roger Stewart13-Dec-03 13:46
professionalRoger Stewart13-Dec-03 13:46 
GeneralRe: Database Drivers Pin
Roger Wright13-Dec-03 14:02
professionalRoger Wright13-Dec-03 14:02 
GeneralRe: Database Drivers Pin
Roger Stewart13-Dec-03 14:12
professionalRoger Stewart13-Dec-03 14:12 
GeneralRe: Database Drivers Pin
Roger Wright13-Dec-03 15:13
professionalRoger Wright13-Dec-03 15:13 
Generalsimply standard Pin
forjer13-Dec-03 11:03
forjer13-Dec-03 11:03 
QuestionHow to make an auto-scroll ListBox Pin
UWO13-Dec-03 10:24
UWO13-Dec-03 10:24 
AnswerHere's the answer Pin
v_srinu_26_f13-Dec-03 13:32
v_srinu_26_f13-Dec-03 13:32 
GeneralRe: Here's the answer Pin
UWO13-Dec-03 19:20
UWO13-Dec-03 19:20 
AnswerRe: How to make an auto-scroll ListBox Pin
Roger Stewart13-Dec-03 14:07
professionalRoger Stewart13-Dec-03 14:07 
GeneralRe: How to make an auto-scroll ListBox Pin
UWO13-Dec-03 19:23
UWO13-Dec-03 19:23 
AnswerRe: How to make an auto-scroll ListBox Pin
JWood13-Dec-03 15:14
JWood13-Dec-03 15:14 
GeneralRe: How to make an auto-scroll ListBox Pin
UWO13-Dec-03 19:25
UWO13-Dec-03 19:25 
GeneralRe: (?) about STL Pin
Ian Darling13-Dec-03 10:28
Ian Darling13-Dec-03 10:28 
GeneralRe: (?) about STL Pin
Ian Darling13-Dec-03 11:12
Ian Darling13-Dec-03 11:12 
QuestionHow to find item or string in ListCtrl Pin
vss11113-Dec-03 10:10
vss11113-Dec-03 10:10 
AnswerRe: How to find item or string in ListCtrl Pin
Ravi Bhavnani13-Dec-03 10:48
professionalRavi Bhavnani13-Dec-03 10:48 
GeneralXP look on dialog controls Pin
Genije13-Dec-03 9:41
Genije13-Dec-03 9:41 
GeneralDetermining the type of a member variable Pin
Anonymous13-Dec-03 9:22
Anonymous13-Dec-03 9:22 
GeneralRe: Determining the type of a member variable Pin
#realJSOP13-Dec-03 9:36
professional#realJSOP13-Dec-03 9:36 
GeneralRe: Determining the type of a member variable Pin
Ian Darling13-Dec-03 10:12
Ian Darling13-Dec-03 10:12 
Given that in this case all you want to do is swap the member, why not call swap on that? The nice part about this is that it requires at compile time that what you pass into swap_x_with_y has an x and y member variable. The realswap function will happily just swap over whatever you give it, providing they are the same type.

template<class T> swap_x_with_y(T &v)
{
  realswap(v.x, v.y);
}

template<class T> realswap(T &x, T&y)
{
 T t = x;
 x = y;
 y = t;
}


--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
Generalcapture output Pin
thes3cr3t113-Dec-03 8:53
thes3cr3t113-Dec-03 8:53 
GeneralRe: capture output Pin
BaldwinMartin13-Dec-03 9:05
BaldwinMartin13-Dec-03 9:05 
GeneralRe: capture output Pin
thes3cr3t113-Dec-03 9:29
thes3cr3t113-Dec-03 9:29 
QuestionRegistry Question ? Pin
BaldwinMartin13-Dec-03 8:47
BaldwinMartin13-Dec-03 8:47 
AnswerRe: Registry Question ? Pin
BaldwinMartin13-Dec-03 14:40
BaldwinMartin13-Dec-03 14:40 

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.