Click here to Skip to main content
15,921,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: I need ur help Pin
Arman S.30-Oct-05 10:03
Arman S.30-Oct-05 10:03 
QuestionHow to show a Icon and a string on the same pane of the status bar? Pin
Tcpip200529-Oct-05 19:54
Tcpip200529-Oct-05 19:54 
AnswerRe: How to show a Icon and a string on the same pane of the status bar? Pin
Dmitriy Yakovlev31-Oct-05 7:48
Dmitriy Yakovlev31-Oct-05 7:48 
Questionsyntax error '<' Pin
gr8coaster32929-Oct-05 19:39
gr8coaster32929-Oct-05 19:39 
AnswerRe: syntax error '<' Pin
Ghasrfakhri29-Oct-05 19:22
Ghasrfakhri29-Oct-05 19:22 
QuestionRe: syntax error '<' Pin
gr8coaster32930-Oct-05 4:49
gr8coaster32930-Oct-05 4:49 
QuestionRe: syntax error '<' Pin
David Crow31-Oct-05 3:37
David Crow31-Oct-05 3:37 
QuestionRe: syntax error '<' Pin
gr8coaster32931-Oct-05 9:26
gr8coaster32931-Oct-05 9:26 
AnswerRe: syntax error '<' Pin
David Crow31-Oct-05 9:49
David Crow31-Oct-05 9:49 
QuestionPrinting an image Pin
DanYELL29-Oct-05 17:07
DanYELL29-Oct-05 17:07 
AnswerRe: Printing an image Pin
Christian Graus30-Oct-05 11:41
protectorChristian Graus30-Oct-05 11:41 
GeneralRe: Printing an image Pin
DanYELL30-Oct-05 16:50
DanYELL30-Oct-05 16:50 
GeneralRe: Printing an image Pin
Christian Graus30-Oct-05 16:53
protectorChristian Graus30-Oct-05 16:53 
QuestionSPDRP_FRIENDLYNAME Pin
LiYS29-Oct-05 16:41
LiYS29-Oct-05 16:41 
QuestionCListCtrl Error Pin
Allad29-Oct-05 15:05
Allad29-Oct-05 15:05 
Questionnumber picker thingie Pin
alex@zoosmart.us29-Oct-05 12:11
alex@zoosmart.us29-Oct-05 12:11 
AnswerRe: number picker thingie Pin
Joe Woodbury29-Oct-05 13:06
professionalJoe Woodbury29-Oct-05 13:06 
GeneralRe: number picker thingie Pin
alex@zoosmart.us30-Oct-05 12:05
alex@zoosmart.us30-Oct-05 12:05 
GeneralRe: number picker thingie Pin
Joe Woodbury30-Oct-05 17:19
professionalJoe Woodbury30-Oct-05 17:19 
Questionsort structures Pin
kerrywes29-Oct-05 9:57
kerrywes29-Oct-05 9:57 
i have a struct array:

typedef struct _PERSON
{
TCHAR *firstName;
TCHAR *lastName;
TCHAR *address;
TCHAR *phone;
} PERSON;

which a properly alloc in annn array of people[10]

then i call:
myAddressBook *book = new myAddressBook(_T("first"),_T("slast"),_T("phone"),_T("add"));
book->addPerson(_T("first"),_T("aaaaa"),_T("phone"),_T("add"));
book->addPerson(_T("first"),_T("bbbbb"),_T("phone"),_T("add"));
book->addPerson(_T("first"),_T("ddddd"),_T("phone"),_T("add"));
book->addPerson(_T("first"),_T("ccccc"),_T("phone"),_T("add"));
book->sortPeople(book->people,book->mTotal);
heres the func:
void myAddressBook::sortPeople(PERSON *per, int num)
{
PERSON *temp;
for (int x=0;x<(mTotal-1); x++)
{
if (_tcsncmp(per[x].lastName, per[x+1].lastName, _tcslen(per[x].lastName)) > 0)
{
//str2 is biggerr, so- swap em
temp = &per[x];
per[x] = per[x+1];
per[x+1] = *temp;
}
}
}

the results are not right, duplicated entries and other oddness, whats wrong?
AnswerRe: sort structures Pin
Chris Losinger29-Oct-05 12:03
professionalChris Losinger29-Oct-05 12:03 
AnswerRe: sort structures Pin
Joe Woodbury29-Oct-05 13:11
professionalJoe Woodbury29-Oct-05 13:11 
AnswerRe: sort structures Pin
Ghasrfakhri29-Oct-05 19:21
Ghasrfakhri29-Oct-05 19:21 
Questioncant signin to homtmail using Pin
whatever8929-Oct-05 9:29
whatever8929-Oct-05 9:29 
Questionfile system type Pin
Chintoo72329-Oct-05 7:26
Chintoo72329-Oct-05 7:26 

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.