| 4 | |
| 5 | == Constructors == |
| 6 | |
| 7 | * CFile(const char* pszFilename, const char* pszMode); |
| 8 | * CFile(const string& strFilename, const char* pszMode); |
| 9 | * CFile(const char* pszFilename, const string& strMode); |
| 10 | * CFile(const string& strFilename, const string& strMode); |
| 11 | |
| 12 | The constructors construct the file object and attempt to open the file. |
| 13 | |
| 14 | {{{ |
| 15 | CFile fileLog("/mnt/fl1/log.txt", "a"); |
| 16 | if(fileLog.IsOpen()) |
| 17 | { |
| 18 | fileLog.Print("Gross %s Tare %s Net %s\r\n", FormatGrossWt(1).c_str(), FormatTareWt(1).c_str(), FormatNetWt(1).c_str()); |
| 19 | fileLog.Close(); |
| 20 | } |
| 21 | }}} |