Hello,

I have a little issue with pointer syntax:

    auto toS = &("abc") ;       // ok
    auto toS = &"abc" ;         // ok

    auto toI = &(1) ;           // Error: constant 1 is not an lvalue
    auto toI = &1 ;             // Error: constant 1 is not an lvalue

The only solution I found is:

    auto i = 1 ;
    auto toI = &i ;

It seems to be a pure syntactic problem. But why does it work with strings? 
"abc" is no more a lvalue, I guess.

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to