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

C / C++ / MFC

 
GeneralRe: Mediaplayer Pin
Mazdak3-Feb-02 3:45
Mazdak3-Feb-02 3:45 
GeneralRe: Mediaplayer Pin
RichardWdy3-Feb-02 17:02
RichardWdy3-Feb-02 17:02 
GeneralCrystal Report and changing database path ... Pin
Hadi Rezaee3-Feb-02 1:14
Hadi Rezaee3-Feb-02 1:14 
GeneralAccessing a MDI child window. Pin
kelthar2-Feb-02 23:31
kelthar2-Feb-02 23:31 
GeneralRe: Accessing a MDI child window. Pin
Mazdak3-Feb-02 0:54
Mazdak3-Feb-02 0:54 
GeneralFence post counterpart Pin
alex.barylski2-Feb-02 21:42
alex.barylski2-Feb-02 21:42 
Questionsorting arrays?? Pin
2-Feb-02 19:08
suss2-Feb-02 19:08 
AnswerRe: sorting arrays?? Pin
Paul M Watt2-Feb-02 19:58
mentorPaul M Watt2-Feb-02 19:58 
Use strcmp to compare to strings.

int StrCmp(
    LPCTSTR lpStr1,
    LPCTSTR lpStr2
);


Parameters


lpStr1

[in] Pointer to the first null-terminated string to be compared.
lpStr2

[in] Pointer to the second null-terminated string to be compared.


Return Values


Returns zero if the strings are identical. Returns a positive value if the string pointed to by lpStr1 is greater than that pointed to by lpStr2. Returns a negative value if the string pointed to by lpStr1 is less than that pointed to by lpStr2.



Remarks


This function returns the difference in value of the first unequal characters it encounters, or zero if they are all equal. For example, if lpStr1="abczb" and lpStr2 = "abcdefg", StrCmp determines that "abczb" is greater than "abcdefg" and returns z - d.



This is how you would determine if one string should go before or after another string, then you could write your own sorting algorithm, or you could use the sort function in STL.
AnswerRe: sorting arrays?? Pin
alex.barylski2-Feb-02 19:59
alex.barylski2-Feb-02 19:59 
AnswerRe: sorting arrays?? Pin
Christian Graus3-Feb-02 2:14
protectorChristian Graus3-Feb-02 2:14 
Questioninsert elements in order??? Pin
2-Feb-02 17:12
suss2-Feb-02 17:12 
AnswerRe: insert elements in order??? Pin
Paul M Watt2-Feb-02 17:41
mentorPaul M Watt2-Feb-02 17:41 
GeneralRe: insert elements in order??? Pin
2-Feb-02 17:52
suss2-Feb-02 17:52 
GeneralRe: insert elements in order??? Pin
Paul M Watt2-Feb-02 18:53
mentorPaul M Watt2-Feb-02 18:53 
Generallooking for a program Pin
A.D2-Feb-02 15:15
A.D2-Feb-02 15:15 
GeneralRe: looking for a program Pin
antoine@orchus-tech2-Feb-02 16:59
antoine@orchus-tech2-Feb-02 16:59 
GeneralRe: looking for a program Pin
A.D2-Feb-02 17:26
A.D2-Feb-02 17:26 
GeneralRe: looking for a program Pin
moliate4-Feb-02 12:09
moliate4-Feb-02 12:09 
GeneralList Control Space Bug Pin
Swinefeaster2-Feb-02 14:55
Swinefeaster2-Feb-02 14:55 
QuestionWTL::CDragListBox Example? Pin
Henry Jacobs2-Feb-02 13:07
Henry Jacobs2-Feb-02 13:07 
Generalmultiple windows in MFC C++ Pin
2-Feb-02 10:51
suss2-Feb-02 10:51 
GeneralRe: multiple windows in MFC C++ Pin
Mazdak2-Feb-02 10:57
Mazdak2-Feb-02 10:57 
GeneralRe: multiple windows in MFC C++ Pin
2-Feb-02 11:20
suss2-Feb-02 11:20 
GeneralRe: multiple windows in MFC C++ Pin
Mazdak2-Feb-02 11:56
Mazdak2-Feb-02 11:56 
GeneralRe: multiple windows in MFC C++ Pin
Mazdak2-Feb-02 12:13
Mazdak2-Feb-02 12: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.