Click here to Skip to main content
16,015,658 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: How to add a MFC dialog in a WTL project? Pin
freehawk18-Jan-04 16:54
freehawk18-Jan-04 16:54 
GeneralRe: How to add a MFC dialog in a WTL project? Pin
Igor Vigdorchik18-Jan-04 18:09
Igor Vigdorchik18-Jan-04 18:09 
GeneralRe: How to add a MFC dialog in a WTL project? Pin
freehawk18-Jan-04 18:29
freehawk18-Jan-04 18:29 
GeneralRe: How to add a MFC dialog in a WTL project? Pin
Igor Vigdorchik18-Jan-04 18:47
Igor Vigdorchik18-Jan-04 18:47 
GeneralRe: How to add a MFC dialog in a WTL project? Pin
freehawk18-Jan-04 19:05
freehawk18-Jan-04 19:05 
GeneralRe: How to add a MFC dialog in a WTL project? Pin
Igor Vigdorchik19-Jan-04 5:13
Igor Vigdorchik19-Jan-04 5:13 
GeneralSTL list sort() limit Pin
GMoss11-Dec-03 3:12
GMoss11-Dec-03 3:12 
GeneralRe: STL list sort() limit Pin
jbarton11-Dec-03 5:40
jbarton11-Dec-03 5:40 
It looks like there is a bug in the list sort routine which ships with VC 6.0.

Looking at the source in <list>, it appears that the internal array used to process the merge sorts is not being handled properly when the array is full.

You might be able to find a fix for this by getting an upgrade to the STL that you use. This isn't a bad idea, as there are a number of problems with the STL that ships with VC 6.0.

For a quick fix, you could patch the <list> header file so that the sort works correctly. Or you could write your own sort routine which fixes the problem.

(just glancing at it, it appears that the sort could be fixed by changing the following sequence:
<br />
if (_I == _MAXN)<br />
   _A[_I].merge(_X);<br />
else<br />
   {_A[_I].swap(_X);<br />
   if (_I == _N)<br />
      ++N; }}<br />


to the following:

<br />
if (_I == _MAXN)<br />
   _A[_I].merge(_X);<br />
else<br />
   _A[_I].swap(_X);<br />
if (_I == _N)<br />
   ++N; }<br />


Note: I only briefly tested this, but it appears to work.

The other choice (if you are going change <list>) is to increase the const _MAXN to a larger number, so that the temporary array can fit more elements. Each increase of this number doubles the size of the list that can be sorted. By setting this to 32, it should be able to handle any size list that you could create.

Best regards,
John
GeneralRe: STL list sort() limit Pin
ZoogieZork11-Dec-03 8:26
ZoogieZork11-Dec-03 8:26 
GeneralInternet Explorer Toolbar Pin
krishnendubagchi@greymatterindia.com11-Dec-03 2:02
krishnendubagchi@greymatterindia.com11-Dec-03 2:02 
GeneralRe: Internet Explorer Toolbar Pin
Michael Dunn11-Dec-03 14:50
sitebuilderMichael Dunn11-Dec-03 14:50 
GeneralUsing Japanese Resources Pin
SanShou10-Dec-03 5:33
SanShou10-Dec-03 5:33 
GeneralWTL 7.1 with VS.NET2003 Support Released Pin
JeremyRemington9-Dec-03 21:10
JeremyRemington9-Dec-03 21:10 
GeneralRe: WTL 7.1 with VS.NET2003 Support Released Pin
Jörgen Sigvardsson10-Dec-03 8:14
Jörgen Sigvardsson10-Dec-03 8:14 
GeneralSTL map. Pin
WREY9-Dec-03 5:11
WREY9-Dec-03 5:11 
GeneralRe: STL map. Pin
ZoogieZork9-Dec-03 6:28
ZoogieZork9-Dec-03 6:28 
GeneralRe: STL map. Pin
WREY9-Dec-03 9:40
WREY9-Dec-03 9:40 
GeneralRe: STL map. Pin
ZoogieZork9-Dec-03 11:42
ZoogieZork9-Dec-03 11:42 
GeneralRe: STL map. Pin
Jörgen Sigvardsson17-Dec-03 8:18
Jörgen Sigvardsson17-Dec-03 8:18 
GeneralImplementing a COM interface in ATL Pin
Judah Gabriel Himango8-Dec-03 9:18
sponsorJudah Gabriel Himango8-Dec-03 9:18 
GeneralRe: Implementing a COM interface in ATL Pin
Jörgen Sigvardsson12-Dec-03 8:19
Jörgen Sigvardsson12-Dec-03 8:19 
GeneralPrinting with WebBrowser Control Pin
Jo Fredrickson7-Dec-03 18:10
Jo Fredrickson7-Dec-03 18:10 
GeneralRe: Printing with WebBrowser Control Pin
Kosenko Kolya19-Dec-03 0:57
Kosenko Kolya19-Dec-03 0:57 
GeneralRe: Printing with WebBrowser Control Pin
Jo Fredrickson19-Dec-03 17:07
Jo Fredrickson19-Dec-03 17:07 
GeneralPersisting STL containers to disk Pin
Jeremy Pullicino5-Dec-03 4:38
Jeremy Pullicino5-Dec-03 4:38 

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.