Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   image how to deal with a .dat file containing characters (http://www.go4expert.com/forums/image-deal-dat-file-containing-t28383/)

laenos 14May2012 23:20

image how to deal with a .dat file containing characters
 
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!!


All times are GMT +5.5. The time now is 17:50.