Click here to Skip to main content
15,885,111 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: windows Visual Studio C++/Visual Basic file locking Pin
cmk30-Aug-10 18:28
cmk30-Aug-10 18:28 
QuestionActiveX without prompting? (or how to create an IE-plugin?) Pin
Don Rolando15-Aug-10 20:44
Don Rolando15-Aug-10 20:44 
AnswerRe: ActiveX without prompting? (or how to create an IE-plugin?) Pin
Cool_Dev28-Aug-10 3:00
Cool_Dev28-Aug-10 3:00 
QuestionC++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice when clicked !!!! [modified] Pin
Kausik4u11-Aug-10 8:54
Kausik4u11-Aug-10 8:54 
AnswerRe: C++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice when clicked !!!! Pin
Stuart Dootson12-Aug-10 4:17
professionalStuart Dootson12-Aug-10 4:17 
GeneralRe: C++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice when clicked !!!! Pin
Kausik4u12-Aug-10 4:27
Kausik4u12-Aug-10 4:27 
QuestionTranlating old code to the STL style Pin
VeganFanatic8-Aug-10 4:47
VeganFanatic8-Aug-10 4:47 
AnswerRe: Tranlating old code to the STL style Pin
Stuart Dootson12-Aug-10 4:13
professionalStuart Dootson12-Aug-10 4:13 
How's this?

template <typename T>
void bubble(std::vector<T> &a)
{
   typedef typename std::vector<T>::iterator Iter;
   Iter last = a.end()-1;
   for(Iter pass=a.begin();pass!=last;++pass)
      for(Iter n=a.begin();n!=last;++n)
         if (*n > *(n+1))
            std::iter_swap(n, n+1);
}


or this, which doesn't keep re-sorting the items at the end of the vector that have already been sorted…

template <typename T>
void bubble(std::vector<T> &a)
{
   typedef typename std::vector<T>::iterator Iter;
   for(Iter last = a.end()-1;last!=a.begin();--last)
      for(Iter n=a.begin();n!=last;++n)
         if (*n > *(n+1))
            std::iter_swap(n, n+1);
}

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

CodeProject MVP for 2010 - who'd'a thunk it!

GeneralRe: Tranlating old code to the STL style Pin
VeganFanatic12-Aug-10 8:33
VeganFanatic12-Aug-10 8:33 
GeneralRe: Tranlating old code to the STL style Pin
Stuart Dootson12-Aug-10 8:51
professionalStuart Dootson12-Aug-10 8:51 
GeneralRe: Tranlating old code to the STL style Pin
VeganFanatic12-Aug-10 8:56
VeganFanatic12-Aug-10 8:56 
GeneralRe: Tranlating old code to the STL style Pin
Stuart Dootson12-Aug-10 9:16
professionalStuart Dootson12-Aug-10 9:16 
GeneralRe: Tranlating old code to the STL style Pin
VeganFanatic12-Aug-10 9:20
VeganFanatic12-Aug-10 9:20 
QuestionATL: WM_MOUSELEAVE Pin
Supriya Tonape6-Aug-10 4:30
Supriya Tonape6-Aug-10 4:30 
AnswerRe: ATL: WM_MOUSELEAVE Pin
Frank Seidler6-Aug-10 4:38
Frank Seidler6-Aug-10 4:38 
GeneralRe: ATL: WM_MOUSELEAVE Pin
Sauro Viti6-Aug-10 4:46
professionalSauro Viti6-Aug-10 4:46 
GeneralRe: ATL: WM_MOUSELEAVE Pin
Supriya Tonape9-Aug-10 2:25
Supriya Tonape9-Aug-10 2:25 
GeneralRe: ATL: WM_MOUSELEAVE Pin
Supriya Tonape9-Aug-10 2:28
Supriya Tonape9-Aug-10 2:28 
QuestionHow can my CDerivedEdit respond WM_SHOWWINDOW? (OnShowWindow) Pin
dancingfish5-Aug-10 21:41
dancingfish5-Aug-10 21:41 
QuestionAuthentication client-server using message queues in c language Pin
ralph 230-Jul-10 2:31
ralph 230-Jul-10 2:31 
AnswerRe: Authentication client-server using message queues in c language Pin
Richard MacCutchan30-Jul-10 3:17
mveRichard MacCutchan30-Jul-10 3:17 
GeneralRe: Authentication client-server using message queues in c language Pin
ralph 230-Jul-10 3:20
ralph 230-Jul-10 3:20 
QuestionProgressBar and Threading.. Pin
Anil Kumar.Arvapalli29-Jul-10 19:53
Anil Kumar.Arvapalli29-Jul-10 19:53 
AnswerRe: ProgressBar and Threading.. Pin
Richard MacCutchan29-Jul-10 22:24
mveRichard MacCutchan29-Jul-10 22:24 
QuestionAdd Publisher name to my application Pin
Cvaji29-Jul-10 2:20
Cvaji29-Jul-10 2:20 

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.