image how to deal with a .dat file containing characters

Discussion in 'C' started by laenos, May 14, 2012.

  1. laenos

    laenos New Member

    Joined:
    May 14, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone,

    I'm programming with Visual Studio 2005.

    Could anyone help me to read a .dat file who contains some columns of characters, it looks like the following:

    01 Magenta
    red 255
    green 0
    blue 255

    02 Turquoise
    red 64
    green 264
    blue 208

    How can I asign each data to a variable? For example, the color name to a variable named m_ColorName.

    Thank you very much in advance!!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice