Click here to Skip to main content
15,914,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: visual studio 6 Pin
locoone21-Oct-06 5:34
locoone21-Oct-06 5:34 
Questionopening like MS Access Design View Pin
Tara1420-Oct-06 10:40
Tara1420-Oct-06 10:40 
QuestionSynchrnonization mechanism Pin
act_x20-Oct-06 9:49
act_x20-Oct-06 9:49 
AnswerRe: Synchrnonization mechanism Pin
Rick York20-Oct-06 12:35
mveRick York20-Oct-06 12:35 
QuestionHow to sense up/down arrows in CEdit Pin
Shay Harel20-Oct-06 8:27
Shay Harel20-Oct-06 8:27 
AnswerRe: How to sense up/down arrows in CEdit Pin
David Crow20-Oct-06 9:43
David Crow20-Oct-06 9:43 
GeneralRe: How to sense up/down arrows in CEdit Pin
Shay Harel20-Oct-06 9:50
Shay Harel20-Oct-06 9:50 
QuestionSTL : stl::sort crashes on vectors. Pin
Maximilien20-Oct-06 5:33
Maximilien20-Oct-06 5:33 
I'm using VS6 ( yeah I know, crappy STL support )

I have a crash when trying to sort a vector of pointers to structures using a custom sort functor; at some point in the sort, one of the 2 parameter of my comparision is invalid ( 0xcdcdcdcd ). This does not happen the first time I call the sort, but at the second time.

I check the values in my vector before calling the std::sort, and the pointers are all valid, as well as the data inside.

/// sort is called like :
std::sort( vector.beginvector.end(), sort_by_type() );


and the comparision is something like :

class sort_by_type
{
public:
  sort_by_type();

public:
  bool operator() (const my_struct* p1, my_struct* p2 ) const
  {
    /// here at some point, p1 is invalid ( 0xcdcdcdcd )
    return IsSmaller( p1, p2 );
  }
};


and with my all-mighty luck, this works on VS.net 2003, so I assume that it must be related to the crappy STL of VS6.

Any ideas ?
so, if there is not quick fix to std::sort, is there a way to have a new and better STL for VS6 ? I don't think all the rest of the developers want to switch to vs.net 2003; I'm the only one using it.

Thanks a bunch !!

Max.



Maximilien Lincourt
Your Head A Splode - Strong Bad

AnswerRe: STL : stl::sort crashes on vectors. Pin
Zac Howland20-Oct-06 7:35
Zac Howland20-Oct-06 7:35 
GeneralRe: STL : stl::sort crashes on vectors. Pin
Maximilien20-Oct-06 8:05
Maximilien20-Oct-06 8:05 
GeneralRe: STL : stl::sort crashes on vectors. Pin
Christian Graus20-Oct-06 8:15
protectorChristian Graus20-Oct-06 8:15 
GeneralRe: STL : stl::sort crashes on vectors. Pin
Maximilien20-Oct-06 9:15
Maximilien20-Oct-06 9:15 
AnswerRe: STL : stl::sort crashes on vectors. Pin
Sceptic Mole20-Oct-06 10:18
Sceptic Mole20-Oct-06 10:18 
QuestionMDI Child Windows Pin
baerten20-Oct-06 4:05
baerten20-Oct-06 4:05 
Questionproblem with an edit control Pin
Desmo1620-Oct-06 4:03
Desmo1620-Oct-06 4:03 
AnswerRe: problem with an edit control Pin
Maximilien20-Oct-06 4:06
Maximilien20-Oct-06 4:06 
GeneralRe: problem with an edit control Pin
Desmo1620-Oct-06 4:14
Desmo1620-Oct-06 4:14 
AnswerRe: problem with an edit control Pin
Christian Graus20-Oct-06 4:23
protectorChristian Graus20-Oct-06 4:23 
AnswerRe: problem with an edit control Pin
sheshidar20-Oct-06 19:27
sheshidar20-Oct-06 19:27 
QuestionUse of more than one Network Interface Card Pin
Luca8220-Oct-06 3:58
Luca8220-Oct-06 3:58 
AnswerRe: Use of more than one Network Interface Card Pin
Luca8220-Oct-06 6:06
Luca8220-Oct-06 6:06 
QuestionHiding Folders Pin
_tasleem20-Oct-06 3:39
_tasleem20-Oct-06 3:39 
QuestionRe: Hiding Folders Pin
David Crow20-Oct-06 3:46
David Crow20-Oct-06 3:46 
AnswerRe: Hiding Folders Pin
Sceptic Mole20-Oct-06 10:20
Sceptic Mole20-Oct-06 10:20 
QuestionDomodal() Pin
Max++20-Oct-06 3:28
Max++20-Oct-06 3:28 

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.