A
Alan Robert Clark
Hi *
gcc 2.96 RH7.2 refuses this:
string infoFileName = "machineinfo.txt";
ifstream infoFile (infoFileName);
I have recently vowed to move to the standard library stuff, instead of my
usual cobbled together stuff. What am I missing? Surely <fstream> and
<string> should work together?
If I really need to:
ifstream infoFile (infoFileName.c_ptr());
what is the use of using string's as opposed to char* if thats what
everything else expects?
Missing something and Confused. Guidance please.
(newsfeed very unreliable, please Cc: I very often get 3rd generation
replies on the news withou seeing 1st generation replies :-(
Alan
--
Alan Robert Clark, Pr Eng Computational Electromagnetics
Associate Professor Wits University
School of Electrical and Information Engineering
Wits; Gauteng ``Bugs are later known as features''
2050 South Africa Ps 111:10; Ps 37/150
Fax (+27 11)403-1929 (e-mail address removed)(Pref)
Tel (+27 11)717-7223(24hr) <http://YingTongDiddleiPo.ee.wits.ac.za/>
**Linux 2.4pl7(RH7.2)---the choice of a GNU generation.**
gcc 2.96 RH7.2 refuses this:
string infoFileName = "machineinfo.txt";
ifstream infoFile (infoFileName);
I have recently vowed to move to the standard library stuff, instead of my
usual cobbled together stuff. What am I missing? Surely <fstream> and
<string> should work together?
If I really need to:
ifstream infoFile (infoFileName.c_ptr());
what is the use of using string's as opposed to char* if thats what
everything else expects?
Missing something and Confused. Guidance please.
(newsfeed very unreliable, please Cc: I very often get 3rd generation
replies on the news withou seeing 1st generation replies :-(
Alan
--
Alan Robert Clark, Pr Eng Computational Electromagnetics
Associate Professor Wits University
School of Electrical and Information Engineering
Wits; Gauteng ``Bugs are later known as features''
2050 South Africa Ps 111:10; Ps 37/150
Fax (+27 11)403-1929 (e-mail address removed)(Pref)
Tel (+27 11)717-7223(24hr) <http://YingTongDiddleiPo.ee.wits.ac.za/>
**Linux 2.4pl7(RH7.2)---the choice of a GNU generation.**