|
From: <h.r...@gm...> - 2002-07-06 06:09:40
|
Hello,
I have two questions.
At first, is there intended (in near future) to build a package with fltk ?
At second:
In the following code is an error, but i cannot find it. Always if i type q
to finish the data entry i get a error message :
testproj1.exe Fehler in Anwendung
Die Anweisung in "0x00401b21" verweist auf Speicher "0x00000000". Der
Vorgang "read konnte nicht auf dem Speicher durchgeführt werden...
Codesnip:
string SP(size_t n) {
string s(n, ' ');
return s;
}
bool ReadDataKbd(const string &s) {
ofstream out(s.c_str());
string ein;
cout << "Sollwert:" << SP(6);
cin >> ein;
out << ein << endl;
cout << "Untere Grenze: ";
cin >> ein;
out << ein << endl;
cout << "Obere Grenze: ";
cin >> ein;
out << ein << endl;
bool finished;
int cnt = 1;
size_t w = 5;
do {
if (cnt > 99) w = 3;
else if (cnt > 9) w = 4;
cout << "Messwert " << cnt << SP(w);
cin >> ein;
if (finished = (ein[0] == 'q')) break;
out << ein << endl;
cnt++;
} while (!finished);
out.close();
return true;
}
Thanks in advance
greetings
Horst
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
|