NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2607

'identifier' : cannot implicitly convert a 'type1' to a 'type2' that is not const

In C++, you can create a reference to another object by initializing the reference using the & operator. You can modify the original object by changing the reference object. This is similar to modifying a variable through a pointer in C, but you do not need to dereference the pointer. If you try to initialize a reference to an object of another type (an int reference to a float variable, for example), error C2607 results.

The reference to type2 must be:

Example

float f;
int& ri2 = f; // error, f is not an int l-value