Thread: Delimiter in while loop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    385

    Delimiter in while loop

    When you are writing a whilestatment like this you have ',' as a delimiter.
    What I wonder is if it is possible to have more than only one delimiter as I also want at the same time use " " and ")". (a blank space and a ")" )
    Is this possible ?


    Code:
    while( getline(ReadFile, OneString, ',')
    {
    }while( getline(ReadFile, OneString, ',')
    {
    }
    I am trying out something like this, however this does not work/compile:

    Code:
    char limiter = ( ',' ')' ' ');
    
    while( getline(ReadFile, OneString, limiter)
    {
    }
    Last edited by Coding; 03-07-2008 at 11:00 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My loop within loop won't work
    By Ayreon in forum C Programming
    Replies: 3
    Last Post: 03-18-2009, 10:44 AM
  2. loop in a linked linked lists
    By kris.c in forum C Programming
    Replies: 6
    Last Post: 08-26-2006, 12:38 PM
  3. Personal Program that is making me go wtf?
    By Submeg in forum C Programming
    Replies: 20
    Last Post: 06-27-2006, 12:13 AM
  4. A somewhat bizzare problem!!! - WHILE LOOP
    By bobthebullet990 in forum C Programming
    Replies: 3
    Last Post: 03-31-2006, 07:19 AM
  5. when a while loop will stop ?
    By blue_gene in forum C Programming
    Replies: 13
    Last Post: 04-20-2004, 03:45 PM