Thread: Help me with split function.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Banned
    Join Date
    Mar 2008
    Posts
    78

    Help me with split function.

    I have an CHAR array, in that array, each "place" has this syntax: "xxx-yyy"

    Where XXX is a Id value and YYY is a property.

    I want to make a function that goes to a "place" in that array, for example array[2], and receives something like this "437-662", and splits it into 2 int variables, the result may be like this:

    CHAR id = 437 and CHAR prop = 662.

    How can i do that?

    (no, i cant use struct or something....)
    Last edited by Milhas; 03-29-2008 at 07:21 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. doubt in c parser coding
    By akshara.sinha in forum C Programming
    Replies: 4
    Last Post: 12-23-2007, 01:49 PM
  3. Troubleshooting Input Function
    By SiliconHobo in forum C Programming
    Replies: 14
    Last Post: 12-05-2007, 07:18 AM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  5. Split function
    By fkheng in forum C Programming
    Replies: 7
    Last Post: 07-08-2003, 08:26 PM