Reading config files with C++ -


possible duplicates:
c++ read lines file
file based configuration handling in c ( unix )

using c++ how can extract data int id; string name; char mac[6]; configuration file: config.txt. contents of example:

id 34 name buzinga mac 0x67:0x45:0x4d:0x5d:0xcc:0x13 

first, search web , stack overflow keywords "parsing" , "file". narrow search, add keywords "mac address c++".

next, prefer read data memory process memory. in other words, read line of text string , use methods of std::string finding items in text.

research std::stringstream ways convert textual representations of numbers internal representations.

try on own. if have issues, post smallest amount of code recreate issue along compiler output expect program produce.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -