Click here to Skip to main content
       

C / C++ / MFC

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: Shred a foldermemberMehdiHazrati27-Nov-12 4:26 
GeneralRe: Shred a foldermvpRichard MacCutchan27-Nov-12 4:28 
GeneralRe: Shred a foldermemberMehdiHazrati27-Nov-12 4:50 
GeneralRe: Shred a foldermvpRichard MacCutchan27-Nov-12 5:05 
GeneralRe: Shred a foldermemberMehdiHazrati27-Nov-12 5:23 
QuestionRe: Shred a foldermemberDavidCrow27-Nov-12 6:04 
GeneralRe: Shred a foldermvpRichard MacCutchan27-Nov-12 6:29 
QuestionRe: Shred a foldermemberDavidCrow27-Nov-12 6:03 
AnswerRe: Shred a foldermemberjschell27-Nov-12 13:08 
GeneralRe: Shred a foldermemberMehdiHazrati27-Nov-12 17:45 
GeneralRe: Shred a foldermemberjschell28-Nov-12 8:33 
Questiondo-while did not workmemberho_khalaf26-Nov-12 19:36 
AnswerRe: do-while did not workmemberAndy41126-Nov-12 19:55 
As mentioned in the QA section: Please don't cross post. I decided to answer you here.
 
Did you take a look at "again" in the debugger? You will recognize that in the second round thru the loop it will have the value 0x0a == \r it's the carriage return from your input.
 
You can try something like this to catch the CR:
 
char cr;
char again;
do
{
    printf("insert y or Y to repeat");
    fflush(stdout);
 
    again = getchar();
    cr = getchar();
 
}while(again=='y'||again=='Y');

GeneralRe: do-while did not workmemberho_khalaf26-Nov-12 20:04 
GeneralRe: do-while did not workmemberAndy41126-Nov-12 20:08 
AnswerRe: do-while did not workmemberwater-moon201226-Nov-12 20:20 
Questioneclipsememberho_khalaf26-Nov-12 8:02 
QuestionRe: eclipsememberMaximilien26-Nov-12 8:04 
AnswerRe: eclipsememberho_khalaf26-Nov-12 8:08 
AnswerRe: eclipsemvpRichard MacCutchan26-Nov-12 8:15 
Questiondo-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 6:50 
AnswerRe: do-while did not work in eclipse c\c++ IDE ?memberChris Meech26-Nov-12 7:07 
AnswerRe: do-while did not work in eclipse c\c++ IDE ?mvpRichard MacCutchan26-Nov-12 8:00 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 8:12 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?mvpRichard MacCutchan26-Nov-12 8:14 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 8:16 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 8:20 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?mvpRichard MacCutchan26-Nov-12 8:22 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 8:27 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?mvpRichard MacCutchan26-Nov-12 8:57 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? [modified]memberDavidCrow26-Nov-12 10:37 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 10:45 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 12:02 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberDavidCrow26-Nov-12 16:39 
GeneralRe: do-while did not work in eclipse c\c++ IDE ?memberho_khalaf26-Nov-12 19:26 
QuestionC++: CreateProcess() launching child applications with UAC dialog for oncememberFarrukhw25-Nov-12 23:58 
AnswerRe: C++: CreateProcess() launching child applications with UAC dialog for oncememberAndrew Cherednik26-Nov-12 12:21 
QuestionHow to use NTGraph3D Activex Control in Visual Studio 2010.memberDhrumilS23-Nov-12 0:48 
AnswerRe: How to use NTGraph3D Activex Control in Visual Studio 2010.mvpRichard MacCutchan23-Nov-12 1:43 
QuestionHow to get a ip address from system name [modified]memberD.Manivelan22-Nov-12 22:20 
AnswerRe: How to get a ip address from system namemembermsr_codeproject22-Nov-12 23:23 
AnswerRe: How to get a ip address from system namememberRolf Kristensen23-Nov-12 0:41 
QuestionHeap corruption problem after AfxBeginThread?memberbosfan22-Nov-12 21:14 
AnswerRe: Heap corruption problem after AfxBeginThread?membersirama200422-Nov-12 22:13 
AnswerRe: Heap corruption problem after AfxBeginThread?mvpRichard MacCutchan22-Nov-12 23:40 
GeneralRe: Heap corruption problem after AfxBeginThread?memberbosfan22-Nov-12 23:44 
AnswerRe: Heap corruption problem after AfxBeginThread?memberBilliousBob23-Nov-12 4:49 
AnswerRe: Heap corruption problem after AfxBeginThread?memberStephen Hewitt25-Nov-12 7:04 
QuestionWhat are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name?memberlucky_122122-Nov-12 0:41 
AnswerRe: What are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name?mvpRichard MacCutchan22-Nov-12 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130617.1 | Last Updated 18 Jun 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid