URGENT! help with C++ PLEASE!

Discussion in 'Software' started by Akumos, Nov 22, 2007.

  1. Akumos

    Akumos Private E-2

    Hi, thanks for looking.

    I have a project due in tomorrow and I started by making each function sepeate and they all worked fine.
    Now there finished I'm putting them all into one project and linking them with a menu. This part is messing up:

    printf("\n\nEnter Morse Code: ");
    gets(input); //THIS LINE IS NOT WORKING!
    printf("\nYou entered %s",input);

    before, this code prompted the user for text and stored it in 'input'! now i've linked the function to a menu it ignores it!!

    anyone know why?
     
  2. timduk

    timduk Private E-2

    If it works as stand alone, but fails in menu, then the logical conclusion is that the menu is somehow blocking or taking over standard input. I'd start by having a closer look at the menu code.
     
  3. Akumos

    Akumos Private E-2

    thanks for ur help timduk, it was bacsue I had to use fflush to flush the buffer.

    Thanks again!
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds