Thread: TCHAR array parsing??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    2

    Question TCHAR array parsing??

    Hi,

    I've got some problems parsing a string. (actually it's a PTACHAR)

    Here is the format of my string:

    "RED 2132 4365 2341 53 23.0 BLUE 2345 4324 23 35 121 552 432 124"

    RED and BLUE are like keywords, I have to use the values after in
    order to update some field in my application.

    How can I parse this String "word" by "word"? My idea is walk in the
    string until there is a space --> " " and analyse the data. But I
    don't know how to do that??

    Here is my method where I want to parse:
    Code:
    void MyClass::parseMessage(LPCTSTR message)
    {
    	//parse string if not empty
    	if (strlen(message)!=0) {
    
              //do the paring here
    
    	}
    }

    Thanks you for your Help

    LIO
    Last edited by dude1978; 05-21-2003 at 01:45 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2d array question
    By gmanUK in forum C Programming
    Replies: 2
    Last Post: 04-21-2006, 12:20 PM
  2. Template Array Class
    By hpy_gilmore8 in forum C++ Programming
    Replies: 15
    Last Post: 04-11-2004, 11:15 PM
  3. parsing words out to pointer array
    By da_fall_guy in forum C++ Programming
    Replies: 4
    Last Post: 05-06-2003, 12:21 PM
  4. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 08:31 AM
  5. Parsing array elements
    By DMaxJ in forum C++ Programming
    Replies: 1
    Last Post: 10-23-2001, 11:28 AM