Support Board
Date/Time: Mon, 24 Feb 2025 18:41:27 +0000
Post From: sc. structure passed by reference as default value to all functions
[2021-03-17 13:27:17] |
User907968 - Posts: 833 |
namespace util{ class Logger { public: Logger(SCStudyInterfaceRef sc):p_Interface(&sc) {} void log(const SCDateTime& value, SCString comment = "") { SCString s = p_Interface->FormatDateTime(value).GetChars(); comment += s; p_Interface->AddMessageToLog(comment, 1); } private: s_sc* p_Interface; }; } Cannot have static function that references non-static member, also add braces to constructor. |