سؤال

I'm seeing this in a program. I can't find anything on ":=". What is it used for?

The program says:

val1 := val1 * (val2 + result);
هل كانت مفيدة؟

المحلول

Absolutely nothing. The := operator is an assignment operator in other languages. C++, like C, uses just the = operator.

نصائح أخرى

It could be ALGOL 68 or Pascal but it probably is pseudo code where it is common to use := for assignments and = for comparisons. In C++ there is no := operator.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top