I'm having trouble making service log, which makes .txt file from keil. I've already made the c code, and it works good for visual studio, but not in Keil. The function i use to make the .txt log file is "ofstream" and it doesn't seem to be in Keil, but there must be some other function that can build .txt file in Keil? Plz give me some advice.... Johnny Here is the C code: #include <iostream> #include <fstream> using namespace std; int main() { ofstream ServiceRapport("c:/ServiceRapport.txt",ios::app ); char navn[30]; cout << "Name: " << endl; cin >> Name; char What[300]; cout << "What has happened: " << endl; cin >> What; ServiceRapport << endl << "-------------------------------<Service Rapport>--------------------------------" << endl; ServiceRapport << "Name: " << name << endl; ServiceRapport << "Date: " << endl; ServiceRapport << "Rapport Nr: " << endl << endl; ServiceRapport << "What has happened: " << endl << endl << What << endl; return 0; }
Here is list of what is included in, and omitted from, the C51 Library: http://www.keil.com/support/man/docs/c51/c51_xa_librarydif.htm In particular, note the reason stated for the omissions: "Many, however, are not applicable to an embedded application and are excluded from the Cx51 Library." (my emphasis)
Thx