Click here to Skip to main content
12,243,182 members (22,111 online)

C / C++ / MFC

 
QuestionRe: Shred a folder Pin
DavidCrow27-Nov-12 4:57
memberDavidCrow27-Nov-12 4:57 
AnswerRe: Shred a folder Pin
MehdiHazrati27-Nov-12 5:26
memberMehdiHazrati27-Nov-12 5:26 
GeneralRe: Shred a folder Pin
Richard MacCutchan27-Nov-12 5:28
mvpRichard MacCutchan27-Nov-12 5:28 
GeneralRe: Shred a folder Pin
MehdiHazrati27-Nov-12 5:50
memberMehdiHazrati27-Nov-12 5:50 
GeneralRe: Shred a folder Pin
Richard MacCutchan27-Nov-12 6:05
mvpRichard MacCutchan27-Nov-12 6:05 
GeneralRe: Shred a folder Pin
MehdiHazrati27-Nov-12 6:23
memberMehdiHazrati27-Nov-12 6:23 
QuestionRe: Shred a folder Pin
DavidCrow27-Nov-12 7:04
memberDavidCrow27-Nov-12 7:04 
GeneralRe: Shred a folder Pin
Richard MacCutchan27-Nov-12 7:29
mvpRichard MacCutchan27-Nov-12 7:29 
QuestionRe: Shred a folder Pin
DavidCrow27-Nov-12 7:03
memberDavidCrow27-Nov-12 7:03 
AnswerRe: Shred a folder Pin
jschell27-Nov-12 14:08
memberjschell27-Nov-12 14:08 
GeneralRe: Shred a folder Pin
MehdiHazrati27-Nov-12 18:45
memberMehdiHazrati27-Nov-12 18:45 
GeneralRe: Shred a folder Pin
jschell28-Nov-12 9:33
memberjschell28-Nov-12 9:33 
Questiondo-while did not work Pin
ho_khalaf26-Nov-12 20:36
memberho_khalaf26-Nov-12 20:36 
AnswerRe: do-while did not work Pin
Andy41126-Nov-12 20:55
memberAndy41126-Nov-12 20: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 work Pin
ho_khalaf26-Nov-12 21:04
memberho_khalaf26-Nov-12 21:04 
GeneralRe: do-while did not work Pin
Andy41126-Nov-12 21:08
memberAndy41126-Nov-12 21:08 
AnswerRe: do-while did not work Pin
water-moon201226-Nov-12 21:20
memberwater-moon201226-Nov-12 21:20 
Questioneclipse Pin
ho_khalaf26-Nov-12 9:02
memberho_khalaf26-Nov-12 9:02 
QuestionRe: eclipse Pin
Maximilien26-Nov-12 9:04
memberMaximilien26-Nov-12 9:04 
AnswerRe: eclipse Pin
ho_khalaf26-Nov-12 9:08
memberho_khalaf26-Nov-12 9:08 
AnswerRe: eclipse Pin
Richard MacCutchan26-Nov-12 9:15
mvpRichard MacCutchan26-Nov-12 9:15 
Questiondo-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 7:50
memberho_khalaf26-Nov-12 7:50 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? Pin
Chris Meech26-Nov-12 8:07
memberChris Meech26-Nov-12 8:07 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 9:00
mvpRichard MacCutchan26-Nov-12 9:00 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 9:12
memberho_khalaf26-Nov-12 9:12 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 9:14
mvpRichard MacCutchan26-Nov-12 9:14 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 9:16
memberho_khalaf26-Nov-12 9:16 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 9:20
memberho_khalaf26-Nov-12 9:20 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 9:22
mvpRichard MacCutchan26-Nov-12 9:22 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 9:27
memberho_khalaf26-Nov-12 9:27 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 9:57
mvpRichard MacCutchan26-Nov-12 9:57 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? Pin
DavidCrow26-Nov-12 11:37
memberDavidCrow26-Nov-12 11:37 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 11:45
memberho_khalaf26-Nov-12 11:45 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 13:02
memberho_khalaf26-Nov-12 13:02 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
DavidCrow26-Nov-12 17:39
memberDavidCrow26-Nov-12 17:39 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 20:26
memberho_khalaf26-Nov-12 20:26 
QuestionC++: CreateProcess() launching child applications with UAC dialog for once Pin
Farrukhw26-Nov-12 0:58
memberFarrukhw26-Nov-12 0:58 
AnswerRe: C++: CreateProcess() launching child applications with UAC dialog for once Pin
Andrew Cherednik26-Nov-12 13:21
memberAndrew Cherednik26-Nov-12 13:21 
QuestionHow to use NTGraph3D Activex Control in Visual Studio 2010. Pin
DhrumilS23-Nov-12 1:48
memberDhrumilS23-Nov-12 1:48 
AnswerRe: How to use NTGraph3D Activex Control in Visual Studio 2010. Pin
Richard MacCutchan23-Nov-12 2:43
mvpRichard MacCutchan23-Nov-12 2:43 
QuestionHow to get a ip address from system name Pin
D.Manivelan22-Nov-12 23:20
memberD.Manivelan22-Nov-12 23:20 
AnswerRe: How to get a ip address from system name Pin
msr_codeproject23-Nov-12 0:23
membermsr_codeproject23-Nov-12 0:23 
AnswerRe: How to get a ip address from system name Pin
Rolf Kristensen23-Nov-12 1:41
memberRolf Kristensen23-Nov-12 1:41 
QuestionHeap corruption problem after AfxBeginThread? Pin
bosfan22-Nov-12 22:14
memberbosfan22-Nov-12 22:14 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
sirama200422-Nov-12 23:13
membersirama200422-Nov-12 23:13 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
Richard MacCutchan23-Nov-12 0:40
mvpRichard MacCutchan23-Nov-12 0:40 
GeneralRe: Heap corruption problem after AfxBeginThread? Pin
bosfan23-Nov-12 0:44
memberbosfan23-Nov-12 0:44 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
BilliousBob23-Nov-12 5:49
memberBilliousBob23-Nov-12 5:49 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
Stephen Hewitt25-Nov-12 8:04
memberStephen Hewitt25-Nov-12 8:04 
QuestionWhat are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name? Pin
lucky_122122-Nov-12 1:41
memberlucky_122122-Nov-12 1:41 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 30 Apr 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid