Click here to Skip to main content
15,892,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSending HTTP Post via TCP/IP Pin
Dustin Henry13-Sep-10 11:15
Dustin Henry13-Sep-10 11:15 
AnswerRe: Sending HTTP Post via TCP/IP Pin
Dustin Henry13-Sep-10 11:37
Dustin Henry13-Sep-10 11:37 
GeneralRe: Sending HTTP Post via TCP/IP Pin
Moak14-Sep-10 0:32
Moak14-Sep-10 0:32 
AnswerRe: Sending HTTP Post via TCP/IP Pin
markkuk13-Sep-10 11:52
markkuk13-Sep-10 11:52 
GeneralRe: Sending HTTP Post via TCP/IP Pin
Dustin Henry13-Sep-10 12:15
Dustin Henry13-Sep-10 12:15 
AnswerRe: Sending HTTP Post via TCP/IP Pin
Moak14-Sep-10 0:22
Moak14-Sep-10 0:22 
GeneralRe: Sending HTTP Post via TCP/IP Pin
Dustin Henry14-Sep-10 7:02
Dustin Henry14-Sep-10 7:02 
QuestionValidating console input Pin
Danzy8313-Sep-10 7:33
Danzy8313-Sep-10 7:33 
Hello, I getting worried over this input validation as follows:

int age(0);

while (true)
{
    cout << "\nEnter your age: ";
    cin >> age;

    if (cin.fail())
    {
        cin.clear();

        cout << "Please enter a digit (number) only.\n";
      
        continue;
    }

    // Get the newline character
    cin.get();

    break;
}


I don't get any problems when I enter a digit. In a way to validate input, I intentionally entered a letter. The test for cin.fail() is executed and the loop starts again. But when the loop restarts and gets to cin >> age, it does not wait for me to enter anything. It continues as if something has been entered, then the cin.fail() condition statements are executed again and again... I would like to know what I should do so that when the loop restarts and gets to where the application expects input, it waits for user input rather than continuing. Thanks.
AnswerRe: Validating console input Pin
mk1488213-Sep-10 9:08
mk1488213-Sep-10 9:08 
AnswerRe: Validating console input Pin
Aescleal13-Sep-10 11:10
Aescleal13-Sep-10 11:10 
Questiondelete option in IE8 address bar Pin
inza113-Sep-10 7:04
inza113-Sep-10 7:04 
Answersomeone?any idea? Pin
inza122-Sep-10 4:50
inza122-Sep-10 4:50 
QuestionCalling APIs Problem In Drivers Pin
Coder-12345613-Sep-10 7:00
Coder-12345613-Sep-10 7:00 
AnswerRe: Calling APIs Problem In Drivers Pin
JudyL_MD13-Sep-10 11:07
JudyL_MD13-Sep-10 11:07 
QuestionSet the RibbonComboBox to Drop List type by code Pin
coolhem13-Sep-10 4:23
coolhem13-Sep-10 4:23 
AnswerRe: Set the RibbonComboBox to Drop List type by code Pin
Eugen Podsypalnikov13-Sep-10 9:15
Eugen Podsypalnikov13-Sep-10 9:15 
GeneralRe: Set the RibbonComboBox to Drop List type by code Pin
coolhem13-Sep-10 14:56
coolhem13-Sep-10 14:56 
GeneralRe: Set the RibbonComboBox to Drop List type by code Pin
Eugen Podsypalnikov13-Sep-10 19:55
Eugen Podsypalnikov13-Sep-10 19:55 
GeneralRe: Set the RibbonComboBox to Drop List type by code Pin
coolhem13-Sep-10 21:25
coolhem13-Sep-10 21:25 
GeneralRe: Set the RibbonComboBox to Drop List type by code Pin
Eugen Podsypalnikov14-Sep-10 0:00
Eugen Podsypalnikov14-Sep-10 0:00 
GeneralRe: Set the RibbonComboBox to Drop List type by code Pin
coolhem14-Sep-10 22:59
coolhem14-Sep-10 22:59 
QuestionLibraries and compiler compatibility Pin
funwithdolphin13-Sep-10 3:10
funwithdolphin13-Sep-10 3:10 
AnswerRe: Libraries and compiler compatibility Pin
«_Superman_»13-Sep-10 4:04
professional«_Superman_»13-Sep-10 4:04 
AnswerRe: Libraries and compiler compatibility Pin
Chris Losinger13-Sep-10 4:11
professionalChris Losinger13-Sep-10 4:11 
AnswerRe: Libraries and compiler compatibility Pin
Aescleal13-Sep-10 6:24
Aescleal13-Sep-10 6:24 

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.