C++笔记(一)20110223

原创
2011/02/23 18:43
阅读数 611

  近日,公司准备用C++来做个类似openmeetings的软件。C++只是在学校时学习了,当当购了三本《Visal C++ 入门经典(第五版)》、《深入浅出MFC》、《Visaual C++ 音频你/视频处理技术及工程实践》。

1.VC++ 2010 可以编写两种C++应用程序

1).在CLR(Common Language Runtime,虚拟机)中运行的应用程序;

2).用MFC直接编译成机器代码,在本地执行的应用程序。

                  

2.两个独立标准定义的C++版本

 1)ISO/IEC :用于实现本地非托管C++应用程序;

 2)C++/CLI :专门为编写CLR程序而设计,扩展ISO/IEC。

3.关于链接器:

“The linker combines the various modules generated by the compiler from source code fi les, adds required code modules from program libraries supplied as part of C++, and welds everything into an executable whole. The linker can also detect and report errors — for example, if part of your program is missing, or a nonexistent library component is referenced.”

-----------(摘自《Beginning Visual C++ 2010》)

4.关于Visual Studio 2010 IDE中错误处理:单击错误行,按F1可出现详细错误信息。

5.关于头文件引用中用尖括号<>和双引号""的区别

1)双引号"": 

  “ If you write the header fi le name between double quotes, the compiler searches for the header file

               first in the directory that contains the source fi le in which the directive appears. If the header file is not there, the compiler then searches the directories where the standard header fi les are stored.”

--------(摘自《Beginning Visual C++ 2010》)

2)尖括号<>:

   "If the fi le name is enclosed between angled brackets, the compiler only searches the directories it expects to fi nd the standard header files."--------(摘自《Beginning Visual C++ 2010》)

6.ISO/IEC C++基本类型、所占字节数、值域

-----------(摘自《Beginning Visual C++ 2010》)

7.蜂鸣声转义字符\a

8.类型转换

1)隐式类型转换优先级图表:

2)显式类型转换:static_cast<the_type_to_convert_to>(expression);

3) 强制类型转换:(the_type_to_convert_to)expression

4) C++/CLI规范(用于CLR)中的safe_cast:safe_cast<the_type_to_convert_to>(expression);

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
1 收藏
0
分享
返回顶部
顶部