Click here to Skip to main content
15,170,505 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Writing to I/O Port - EASY! Pin
normanS24-Jul-06 20:47
MembernormanS24-Jul-06 20:47 
Questionexternal dependencies Pin
jpg64224-Jul-06 12:43
Memberjpg64224-Jul-06 12:43 
AnswerRe: external dependencies Pin
NrmMyth24-Jul-06 20:41
MemberNrmMyth24-Jul-06 20:41 
Question[Visual C++.NET] plotting 2d data [modified] Pin
franzcatch24-Jul-06 11:45
Memberfranzcatch24-Jul-06 11:45 
AnswerRe: [Visual C++.NET] plotting 2d data Pin
Justin Tay24-Jul-06 12:19
MemberJustin Tay24-Jul-06 12:19 
QuestionMFC Automation support [modified] Pin
bob1697224-Jul-06 11:35
Memberbob1697224-Jul-06 11:35 
AnswerRe: MFC Automation support Pin
bob1697224-Jul-06 12:11
Memberbob1697224-Jul-06 12:11 
Questionstrcmp Pin
jon-8024-Jul-06 10:35
professionaljon-8024-Jul-06 10:35 
function strcmp seems to be returning zero (0) while it is expected to return a negative value when, for example strSentence[1] = "this is a test" and strSentence[2] = "another test".



int iLineNumber = 1;

int x = (strcmp(strSentence[iLineNumber], strSentence[iLineNumber + 1]) < 0);
int y = NULL;

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
AnswerRe: strcmp Pin
Justin Tay24-Jul-06 10:41
MemberJustin Tay24-Jul-06 10:41 
AnswerRe: strcmp Pin
Zac Howland24-Jul-06 10:47
MemberZac Howland24-Jul-06 10:47 
GeneralRe: strcmp Pin
jon-8025-Jul-06 6:25
professionaljon-8025-Jul-06 6:25 
QuestionRe: strcmp Pin
David Crow24-Jul-06 11:07
MemberDavid Crow24-Jul-06 11:07 
AnswerRe: strcmp Pin
jon-8025-Jul-06 6:27
professionaljon-8025-Jul-06 6:27 
QuestionRe: strcmp Pin
David Crow25-Jul-06 9:22
MemberDavid Crow25-Jul-06 9:22 
AnswerRe: strcmp Pin
jon-8026-Jul-06 5:47
professionaljon-8026-Jul-06 5:47 
QuestionRe: strcmp Pin
David Crow26-Jul-06 6:13
MemberDavid Crow26-Jul-06 6:13 
QuestionKeyboard shortcuts Pin
coddy5524-Jul-06 10:13
Membercoddy5524-Jul-06 10:13 
AnswerRe: Keyboard shortcuts Pin
Justin Tay24-Jul-06 10:17
MemberJustin Tay24-Jul-06 10:17 
QuestionOpening a console window from a Windows form project Pin
kialmur24-Jul-06 9:08
Memberkialmur24-Jul-06 9:08 
AnswerRe: Opening a console window from a Windows form project Pin
David Crow24-Jul-06 9:15
MemberDavid Crow24-Jul-06 9:15 
GeneralRe: Opening a console window from a Windows form project Pin
kialmur24-Jul-06 9:44
Memberkialmur24-Jul-06 9:44 
GeneralRe: Opening a console window from a Windows form project Pin
Zac Howland24-Jul-06 9:53
MemberZac Howland24-Jul-06 9:53 
GeneralRe: Opening a console window from a Windows form project Pin
David Crow24-Jul-06 9:55
MemberDavid Crow24-Jul-06 9:55 
Questionmouse & keyboard disabling Pin
RomTibi24-Jul-06 9:06
MemberRomTibi24-Jul-06 9:06 
AnswerRe: mouse & keyboard disabling Pin
Chris Losinger24-Jul-06 9:36
professionalChris Losinger24-Jul-06 9:36 

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.