Rewrite ERROR constant in C++ -


when trying compile following c++ code snippet (using microsoft visual studio 2015):

namespace ns {     const int error = -1; }; 

it returns following error:

c:\workspace\x.hpp(141): error c2143: syntax error: missing ';' before 'constant' c:\workspace\x.hpp(141): error c2059: syntax error: 'constant' 

the constant error defined somewhere, since if 1 makes line comment, error can still printed (it returns 0 matter).

i thought type of collision avoid defining namespace.

how can 1 defined his/her own constant error?


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -