TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: STEVEN WILKINSON
from: THOMAS MAEDER
date: 1997-09-21 16:08:00
subject: Help Needed!

SW>                 i.e. Text string
SW>                      x co-ordinate
SW>                      y co-ordinate
SW>                      Text string
SW>                      etc.
Pack  these  variables into a struct and overload the stream operators
for that struct.
E.g.
int main(int argc, char *argv[]) 
{ 
    TConfig  myConfig;  //  TConfig  is your configuration struct 
    if (ifstream("app.cfg") << myConfig) 
    { 
        // do your work here 
    }
    else
        // complain
}
istream &operator>>(istream &i, TConfig &config)
{
    // read your configuration data here
}
Thomas
---
 þ MM 1.0 #0113 þ C:H„?\>                              (Swiss DOS prompt)
---------------
* Origin: McMeier & Son BBS (2:301/138)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.