在 MQL4 中,可以使用“+”运算符将 int 和 string 拼接在一起。\n\n以下是一个示例代码:\n\nmql4\nint number = 10;\nstring text = "The number is: " + IntegerToString(number);\n\nPrint(text);\n\n\n在上面的示例中,我们定义了一个 int 变量number,并将其设置为 10。然后,我们定义了一个 string 变量text,并使用“+”运算符将number和一个字符串拼接在一起。最后,我们使用Print函数打印出拼接后的字符串。\n\n输出结果为:\n\n\nThe number is: 10\n\n\n通过这种方式,我们可以将 int 和 string 拼接在一起,并将其作为一个字符串使用。

MQL4 中如何拼接 int 和 string 类型数据

原文地址: https://www.cveoy.top/t/topic/qenl 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录