Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Debug vs. Release Build Pin
Viorel.21-Jun-06 5:32
Viorel.21-Jun-06 5:32 
GeneralRe: Debug vs. Release Build Pin
Bob X21-Jun-06 7:03
Bob X21-Jun-06 7:03 
QuestionInitialization part in SDI MFC project. Pin
tingu21-Jun-06 4:25
tingu21-Jun-06 4:25 
AnswerRe: Initialization part in SDI MFC project. Pin
David Crow21-Jun-06 4:32
David Crow21-Jun-06 4:32 
GeneralRe: Initialization part in SDI MFC project. Pin
tingu21-Jun-06 4:44
tingu21-Jun-06 4:44 
GeneralRe: Initialization part in SDI MFC project. Pin
David Crow21-Jun-06 4:49
David Crow21-Jun-06 4:49 
AnswerRe: Initialization part in SDI MFC project. Pin
Viorel.21-Jun-06 4:36
Viorel.21-Jun-06 4:36 
QuestionSort an std::vector?! [modified] Pin
bosfan21-Jun-06 4:11
bosfan21-Jun-06 4:11 
Hello,
how to sort an vector! is there any codesnippet or example for me? i try but my solution dont works!


This is what i try before:
<br />
// Global definition:<br />
typedef vector<CVector>VectorGlobal;<br />
VectorGlobal vec;<br />
<br />
// in function:<br />
// in an iteration i fill the vec with data<br />
// example while!<br />
while(int_value < 10)<br />
{<br />
vec.push_back(CVector(int_value, cstring_value, cstring_value));<br />
}<br />
<br />
// after this i call the sort-function and check if any data stored in vec:<br />
VectorGlobal::iterator iter;<br />
	<br />
	for(iter = vec.begin(); iter != vec.end(); iter++)<br />
	{<br />
		TRACE(L"CSindex: %s,  Url: %s\n", iter->csIndex, iter->csUrl);<br />
	}<br />
	sort(vec.begin(), &vec[vec.size()]);<br />
	<br />
	for(iter = vec.begin(); iter != vec.end(); iter++)<br />
	{<br />
		TRACE(L"CSindex: %s,  Url: %s\n", iter->csIndex, iter->csUrl);<br />
	}<br />
// here is end of fill data in an vector, no debugger errors!<br />


after i call the sort function the datas stay unsortet, where is the error, how to call the sortfunction für an vector?

regards
break;

-- modified at 10:24 Wednesday 21st June, 2006
AnswerRe: Sort an std::vector?! Pin
toxcct21-Jun-06 4:19
toxcct21-Jun-06 4:19 
AnswerRe: Sort an std::vector?! Pin
Chris Losinger21-Jun-06 4:20
professionalChris Losinger21-Jun-06 4:20 
GeneralRe: Sort an std::vector?! [modified] Pin
bosfan21-Jun-06 4:31
bosfan21-Jun-06 4:31 
GeneralRe: Sort an std::vector?! [modified] Pin
Chris Losinger21-Jun-06 4:45
professionalChris Losinger21-Jun-06 4:45 
GeneralRe: Sort an std::vector?! Pin
bosfan21-Jun-06 5:00
bosfan21-Jun-06 5:00 
AnswerRe: Sort an std::vector?! Pin
Zac Howland21-Jun-06 4:30
Zac Howland21-Jun-06 4:30 
GeneralRe: Sort an std::vector?! [modified] Pin
bosfan21-Jun-06 4:38
bosfan21-Jun-06 4:38 
AnswerRe: Sort an std::vector?! Pin
FarPointer21-Jun-06 4:36
FarPointer21-Jun-06 4:36 
AnswerRe: Sort an std::vector?! Pin
Jun Du21-Jun-06 4:59
Jun Du21-Jun-06 4:59 
AnswerRe: Sort an std::vector?! Finished! Pin
bosfan21-Jun-06 20:58
bosfan21-Jun-06 20:58 
QuestionHuge size files IO- Performance issue? Pin
jayart21-Jun-06 3:53
jayart21-Jun-06 3:53 
AnswerRe: Huge size files IO- Performance issue? Pin
jayart21-Jun-06 3:56
jayart21-Jun-06 3:56 
QuestionRe: Huge size files IO- Performance issue? Pin
David Crow21-Jun-06 4:11
David Crow21-Jun-06 4:11 
AnswerRe: Huge size files IO- Performance issue? Pin
jayart21-Jun-06 6:02
jayart21-Jun-06 6:02 
GeneralRe: Huge size files IO- Performance issue? Pin
David Crow21-Jun-06 6:21
David Crow21-Jun-06 6:21 
GeneralRe: Huge size files IO- Performance issue? Pin
Zac Howland21-Jun-06 4:21
Zac Howland21-Jun-06 4:21 
AnswerRe: Huge size files IO- Performance issue? Pin
Ryan Binns21-Jun-06 4:29
Ryan Binns21-Jun-06 4:29 

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.