::GetWindowText(hWnd,buff,256);
这前面的::是什么意思啊,请解答一下吧。谢谢啊!
这前面的::是什么意思啊,请解答一下吧。谢谢啊!
解决方案 »
- 隐藏及显示MDI或SDI框架的标题栏及菜单栏、工具栏、状态栏
- 请教如何对话框中竖条效果
- 重绘clistctrl onpaint问题
- 字符串"用户" 如何转换为gb2312编码的"%D3%C3%BB%A7"的?
- VC中如何判断某个点是否在一条直线上呢
- 求一段代码:向ListCtrl控件插入item并且每个item前有一个图标?
- 怎么把一个位图上下翻转过来?
- 九位数据位的串口通讯
- 在线给分——请问怎么用添加类向导建一个基于CObject的新类??
- 为什么我在vc5.0下编写的程序在vc6.0下执行时出现“无法定位序数368于动态链接库mfcn42d.dll上。”的对话框。
- 不用ALT,只用C/C++如果写一个COM才能在网页中被创建,以及方法可以被调用?
- 手机界面用什么技术来设计更好?
std::XXX()表示调用std名字空间里面的XXX方法
C++ Operators | Operator Precedence and Associativity | Namespaces | Names and Qualified Names
You can tell the compiler to use the global identifier rather than the local identifier by prefixing the identifier with ::, the scope resolution operator.:: identifier
class-name :: identifier
namespace :: identifier
The identifier can be a variable or a function.If you have nested local scopes, the scope resolution operator does not provide access to identifiers in the next outermost scope. It provides access to only the global identifiers.Example
// expre_ScopeResolutionOperator.cpp
// compile with: /EHsc
// Demonstrate scope resolution operator
#include <iostream>using namespace std;int amount = 123; // A global variableint main() {
int amount = 456; // A local variable
cout << ::amount << endl // Print the global variable
<< amount << endl; // Print the local variable
}
The example above has two variables named amount. The first is global and contains the value 123. The second is local to the main function. The scope resolution operator tells the compiler to use the global amount instead of the local one.