Thread: Extracting Whitespace from String

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    47

    Extracting Whitespace from String

    Hi All,

    I'm trying to extract whitespace from a string that I've pulled from a text file. Here's the code:

    Code:
    fileLinePrice = fileLine.substr(30, 5);
    						while (loop < 5)
    	{
    							chr = inData.get(fileLinePrice);
    							   if (chr != ' ')
    	   {
    	          fileLinePrice2 = fileLinePrice2 + chr;
    	          loop++;
    							   }
    	}
    The get function is not working -- I get a bad &%#@ing class -- which I'm growing very impatient with.

    Anyway, any help would be appreciated.

    bob2509

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    47
    figured it out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 02:45 PM
  2. Inheritance Hierarchy for a Package class
    By twickre in forum C++ Programming
    Replies: 7
    Last Post: 12-08-2007, 04:13 PM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  4. Replies: 4
    Last Post: 03-03-2006, 02:11 AM
  5. "Operator must be a member function..." (Error)
    By Magos in forum C++ Programming
    Replies: 16
    Last Post: 10-28-2002, 02:54 PM