Click here to Skip to main content
15,860,859 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question[Visual C++.NET] plotting 2d data [modified] Pin
franzcatch24-Jul-06 10:45
franzcatch24-Jul-06 10:45 
AnswerRe: [Visual C++.NET] plotting 2d data Pin
Justin Tay24-Jul-06 11:19
Justin Tay24-Jul-06 11:19 
QuestionMFC Automation support [modified] Pin
bob1697224-Jul-06 10:35
bob1697224-Jul-06 10:35 
AnswerRe: MFC Automation support Pin
bob1697224-Jul-06 11:11
bob1697224-Jul-06 11:11 
Questionstrcmp Pin
jon-8024-Jul-06 9:35
professionaljon-8024-Jul-06 9:35 
AnswerRe: strcmp Pin
Justin Tay24-Jul-06 9:41
Justin Tay24-Jul-06 9:41 
AnswerRe: strcmp Pin
Zac Howland24-Jul-06 9:47
Zac Howland24-Jul-06 9:47 
GeneralRe: strcmp Pin
jon-8025-Jul-06 5:25
professionaljon-8025-Jul-06 5:25 
I'm actually checking for strcmp ... < 0 and also for strcmp ... > 0, besides I'm checking for other conditions.

bAscending is a boolean determining how the array should be sorted, while strLineNumber[] is the array holding the string values.

while (iLineNumber < iMaxLineNumber)
{
if ((bAscending == true) &&
// lines are not empty
(strSentence[iLineNumber]!= 0) &&
(strSentence[iLineNumber + 1]!= 0) &&
// first line is smaller than the following line
(strcmp(strSentence[iLineNumber], strSentence[iLineNumber + 1]) < 0))
{swapPos(iLineNumber, iLineNumber + 1);}

else if ((bAscending != true) &&
// lines are not empty
(strSentence[iLineNumber]!= 0) &&
(strSentence[iLineNumber + 1]!= 0) &&
(strcmp(strSentence[iLineNumber], strSentence[iLineNumber + 1]) > 0))
{swapPos(iLineNumber, iLineNumber + 1); }


iLineNumber++;
}

Jon
QuestionRe: strcmp Pin
David Crow24-Jul-06 10:07
David Crow24-Jul-06 10:07 
AnswerRe: strcmp Pin
jon-8025-Jul-06 5:27
professionaljon-8025-Jul-06 5:27 
QuestionRe: strcmp Pin
David Crow25-Jul-06 8:22
David Crow25-Jul-06 8:22 
AnswerRe: strcmp Pin
jon-8026-Jul-06 4:47
professionaljon-8026-Jul-06 4:47 
QuestionRe: strcmp Pin
David Crow26-Jul-06 5:13
David Crow26-Jul-06 5:13 
QuestionKeyboard shortcuts Pin
coddy5524-Jul-06 9:13
coddy5524-Jul-06 9:13 
AnswerRe: Keyboard shortcuts Pin
Justin Tay24-Jul-06 9:17
Justin Tay24-Jul-06 9:17 
QuestionOpening a console window from a Windows form project Pin
kialmur24-Jul-06 8:08
kialmur24-Jul-06 8:08 
AnswerRe: Opening a console window from a Windows form project Pin
David Crow24-Jul-06 8:15
David Crow24-Jul-06 8:15 
GeneralRe: Opening a console window from a Windows form project Pin
kialmur24-Jul-06 8:44
kialmur24-Jul-06 8:44 
GeneralRe: Opening a console window from a Windows form project Pin
Zac Howland24-Jul-06 8:53
Zac Howland24-Jul-06 8:53 
GeneralRe: Opening a console window from a Windows form project Pin
David Crow24-Jul-06 8:55
David Crow24-Jul-06 8:55 
Questionmouse & keyboard disabling Pin
RomTibi24-Jul-06 8:06
RomTibi24-Jul-06 8:06 
AnswerRe: mouse & keyboard disabling Pin
Chris Losinger24-Jul-06 8:36
professionalChris Losinger24-Jul-06 8:36 
AnswerRe: mouse & keyboard disabling Pin
Steve Echols24-Jul-06 14:08
Steve Echols24-Jul-06 14:08 
GeneralRe: mouse & keyboard disabling Pin
RomTibi25-Jul-06 7:47
RomTibi25-Jul-06 7:47 
QuestionTile View problem when using Owner Data [modified] Pin
Justin Tay24-Jul-06 7:54
Justin Tay24-Jul-06 7:54 

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.