Click here to Skip to main content
16,013,730 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: System tray menu Pin
David Crow9-Mar-04 7:00
David Crow9-Mar-04 7:00 
GeneralRe: System tray menu Pin
sschilachi9-Mar-04 7:12
sschilachi9-Mar-04 7:12 
GeneralRe: System tray menu Pin
David Crow9-Mar-04 7:19
David Crow9-Mar-04 7:19 
GeneralRe: System tray menu Pin
sschilachi9-Mar-04 7:22
sschilachi9-Mar-04 7:22 
GeneralRe: System tray menu Pin
Iain Clarke, Warrior Programmer9-Mar-04 7:47
Iain Clarke, Warrior Programmer9-Mar-04 7:47 
GeneralLocalizing a Windows Installer Package Pin
Yogurt9-Mar-04 6:51
Yogurt9-Mar-04 6:51 
Generalmerge cells Pin
Member 7389389-Mar-04 6:24
Member 7389389-Mar-04 6:24 
Generalswapping problem Pin
ns9-Mar-04 6:11
ns9-Mar-04 6:11 
I have an algo which takes in an iterator range like Func(I beg, I end).
These are randomaccess iterators so I can do stuff like beg[i] which gives me back the ref to the ith element of the underlying container:

T& t = beg[i].

Now inside the algo I want to swap the contents of say beg[i] and beg[j], and all I have info about is the range. I dont have any info about the type T within my algorithm.

However to do a swap I need a temporary variable to store one of the values :

T& temp = beg[i];
beg[i] = beg[j];
beg[j] = temp;

However, as I said, theres no info on T coming into the algo, so how would I swap the contents using these randomaccess iterators since I very well cant define a 'temp'?
Confused | :confused:
thanks,
ns
GeneralRe: swapping problem Pin
Robert A. T. Káldy9-Mar-04 6:33
Robert A. T. Káldy9-Mar-04 6:33 
GeneralRe: swapping problem Pin
ns9-Mar-04 7:25
ns9-Mar-04 7:25 
GeneralRe: swapping problem Pin
John M. Drescher9-Mar-04 8:01
John M. Drescher9-Mar-04 8:01 
GeneralRe: swapping problem Pin
ns10-Mar-04 1:14
ns10-Mar-04 1:14 
GeneralRe: swapping problem Pin
John M. Drescher10-Mar-04 3:00
John M. Drescher10-Mar-04 3:00 
GeneralRe: GameProgrammer.org Pin
Antti Keskinen9-Mar-04 7:21
Antti Keskinen9-Mar-04 7:21 
QuestionIs there method to set DeviceCaps so as if system font changed? Pin
vgrigor9-Mar-04 6:02
vgrigor9-Mar-04 6:02 
AnswerRe: Is there method to set DeviceCaps so as if system font changed? Pin
David Crow9-Mar-04 7:05
David Crow9-Mar-04 7:05 
GeneralRe: Is there method to set DeviceCaps so as if system font changed? Pin
vgrigor9-Mar-04 20:33
vgrigor9-Mar-04 20:33 
GeneralRe: Is there method to set DeviceCaps so as if system font changed? Pin
David Crow10-Mar-04 2:11
David Crow10-Mar-04 2:11 
GeneralRe: Is there method to set DeviceCaps so as if system font changed? Pin
vgrigor10-Mar-04 2:30
vgrigor10-Mar-04 2:30 
GeneralRe: Is there method to set DeviceCaps so as if system font changed? Pin
David Crow10-Mar-04 3:12
David Crow10-Mar-04 3:12 
GeneralRe: Is there method to set DeviceCaps so as if system font changed? Pin
vgrigor10-Mar-04 3:18
vgrigor10-Mar-04 3:18 
GeneralRe: Is there method to set DeviceCaps so as if system font changed? Pin
David Crow10-Mar-04 4:12
David Crow10-Mar-04 4:12 
GeneralRe: Is there method to set DeviceCaps so as if system font changed? Pin
vgrigor10-Mar-04 4:24
vgrigor10-Mar-04 4:24 
GeneralEorr on exit with RichEditDoc/RichEditView Pin
Luoxz9-Mar-04 5:34
Luoxz9-Mar-04 5:34 
GeneralRe: Eorr on exit with RichEditDoc/RichEditView Pin
David Crow9-Mar-04 7:13
David Crow9-Mar-04 7:13 

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.