Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一个程序中看到了这一点。我在“:=”上找不到任何东西。它是干什么用的?
该程序说:
val1 := val1 * (val2 + result);
绝对没有。:=运算符是其他语言的赋值运算符。C++ 和 C 一样,只使用=运算符。
:=
=
它可能是 ALGOL 68 或 Pascal,但它可能是伪代码,通常使用 := 进行分配和 = 进行比较。在 C++ 中没有 := 运算符。