Visual C ++ [英] Visual C++

查看:80
本文介绍了Visual C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual C ++中使用Windows窗体将华氏温度转换为摄氏温度的简单GUI程序遇到以下行:

A simple GUI program to convert Fahrenheit to Celsius using Windows Forms in Visual C++ came across the following line

System :: ComponentModel :: Container ^ components

System::ComponentModel::Container ^components

上面的代码代表什么?是阶级还是结构?我之前的C ++程序中没有遇到过这样的问题。 

What does the above line represents? Is it Class or structure? I haven't come across such lines in previous C++ programs. 

推荐答案

如果您尝试使用C ++中的Windows窗体,那么您使用的是C ++ / CLI语法,而不是标准C ++。

If you are trying to use Windows Forms from C++, then you are using the C++/CLI syntax, not standard C++.

使用常规C ++范围规则,这是指
Container
System :: ComponentModel 类>命名空间。但^是一个引用,这可以看作是C ++指针*的类似物。

Using the regular C++ scoping rules, this refers to the Container class in the System::ComponentModel namespace. But the ^ is a reference, this can be seen as an analogue to the C++ pointer *.


这篇关于Visual C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆