| mih (24) | |||||
|
Hello all, I am getting below error while trying to compile C++ code cookieSetter.cc:126: error: nav cannot appear in a constant-expression cookieSetter.cc:126: error: `.' cannot appear in a constant-expression Basically there is a enum list defined inside a header file"navBuilder.h" and a function inside cookieSetter.cc file is trying to access the enum constant with a dot "." operator. below is the code snippet from header and .cc file. 1) navBuilder.h
2) cookieSetter.cc
Many thanks for your help.. | |||||
|
|
|||||
| codewalker (163) | |
| I think you meant to use :: instead of . ? | |
|
|
|
| mih (24) | |
|
no i am using "." dot operator , this code was working fine on Solaris, Its giving problem when i am migrating to linux64bit. I tried using :: but it is as well not working i did something like below case nav::constant1: do something. break; | |
|
|
|
| Peter87 (3917) | |||
It should be
| |||
|
|
|||
| mih (24) | |
|
codewalker , Peter, Many thanks, the suggested changes worked.. it was the last piece of code that was not compiling.. | |
|
|
|