error messages like:undefined identifier for m_LogLevel variable expected identifiers from line 40-46.
I have tried using the log functions without the fullstops. I simply dont have any more ideas in my reviewing i did not see any issues within the log.
#include <iostream>
class Log {
private:
const int LogLevelWarning = 1;
const int LogLevelError = 0;
const int LogLevelInfo = 2;
private:
int Loglevel = LogLevelInfo;
public:
void SetLevel(int level) {
int m_Loglevel;
}
void Info(const char* message) {
if (m_LogLevel >= LogLevelInfo) {
std::cout << "[Info]" << message << "\n";
}
}
void Warn(const char* message) {
if (m_LogLevel >= LogLevelWarning) {
std::cout << "[WARNING]" << message << "\n";
}
}
void Error(const char* message) {
if (m_LogLevel >= Lo
gLevelError) {
std::cout << "[Errror]" << message << "\n";
}
}
};
int main() {
Log log;
Log.SetLevel(Log.LogLevelWarning);
Log.Warn("Hello!");
Log.Info("Hey!")
Log.Error("Hi!")
}