left-hand operand of comma has no effect?

Posted by sil3nt on Stack Overflow See other posts from Stack Overflow or by sil3nt
Published on 2010-05-15T09:23:41Z Indexed on 2010/05/15 9:34 UTC
Read the original article Hit count: 299

Filed under:
|
|
|

Hello there, I'm having some trouble with this warning message, it is implemented within a template container class

int k = 0, l = 0;
    for ( k =(index+1), l=0; k < sizeC, l < (sizeC-index); k++,l++){
        elements[k] = arryCpy[l];
    }
    delete[] arryCpy;

this is the warning i get

cont.h: In member function `void Container<T>::insert(T, int)':
cont.h:99: warning: left-hand operand of comma has no effect
cont.h: In member function `void Container<T>::insert(T, int) [with T = double]':
a5testing.cpp:21:   instantiated from here
cont.h:99: warning: left-hand operand of comma has no effect
cont.h: In member function `void Container<T>::insert(T, int) [with T = std::string]':
a5testing.cpp:28:   instantiated from here
cont.h:99: warning: left-hand operand of comma has no effect
>Exit code: 0

© Stack Overflow or respective owner

Related posts about c++

Related posts about warnings