BS>Hello Tim.
BS>>I need implement method which should read a string from configuratio
BS>>and return a part og this string, such as:
BS>>"Server port number: 101"
BS>>method should return "101".
TH>Did you get a solution yet?
BS>Yeh. An ugly one :(. I use internal field to store these lines. I mean
BS>}
BS>Another way may be to use reference to the external buffer
BS>as the methods parameter but I prefered the case described
BS>above
Are you trying to solve for reading the configuration string, parsing
it, or both? Reading it a line at a time w/getline would be simple to
implement. Use "strtok" and "atoi" to parse and get values.
If this is helpful, and you want to go further, let me know.
best regards...
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88)
|