I was trying to write a logging library for C++.
It’s here. The code with errors is on branch dev
.
This is the error message:
In file included from /home/GordonZhang/log.cc/examples/src/log.cc:1:
/home/GordonZhang/log.cc/examples/src/log.h:51:25: error: expected identifier befor
e numeric constant
51 | logstream log_f(1);
| ^
/home/GordonZhang/log.cc/examples/src/log.h:51:25: error: expected ‘,’ or ‘...’ bef
ore numeric constant
make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/log.
cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I thought this is because here are name conflicts.
I didn’t find anything that I think it will cause name conflicts.
How can I solve his problem? (I’m new to C++)