Thread: search char array for specific characters and replace with another

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    5
    Thank you, anduril.

    The strcmp but the only problem I still have is it is still printing everything inside the while loop before it exits.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by chelpplease View Post
    Thank you, anduril.

    The strcmp but the only problem I still have is it is still printing everything inside the while loop before it exits.
    I'm not clear on the problem. You have print statements inside the loop, and now you don't want them to print??

    Show what you want, in a short example (no code, just input output please), from inside the while loop.

  3. #3
    Registered User
    Join Date
    Apr 2012
    Posts
    5
    Adak, if "exit" is entered I only want it to end, without printing everything in the while loop.

  4. #4
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Quote Originally Posted by chelpplease View Post
    if "exit" is entered I only want it to end, without printing everything in the while loop.
    Then do it the way I showed in post#5, which is the cleaner way.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-20-2012, 08:41 AM
  2. finding length of characters in an assigned char array ??
    By charlatanksk in forum C Programming
    Replies: 6
    Last Post: 05-04-2008, 02:34 PM
  3. Replace AlphaNumeric Characters
    By Hexxx in forum C++ Programming
    Replies: 3
    Last Post: 01-01-2006, 06:12 PM
  4. Search and Replace
    By sh0rty in forum C++ Programming
    Replies: 4
    Last Post: 12-26-2002, 03:26 PM
  5. Replies: 2
    Last Post: 05-05-2002, 01:38 PM

Tags for this Thread