C++ 学习(第一天)
2016-02-14 09:24
323 查看
1.函数命名规则: 动词+ 名词
int Founction1(int ncount)
{
int i = 0;
int nRet = 0;
for ( i = 1; i < ncount +1; i++)
{
nRet += i;
}
std::cout<<nRet<<std::endl;
return 0;
}
int main(int argc,const
char * argv[]) {
// insert code here...
std::cout <<"Hello, World!\n";
int nTempCount =
100 ;
Founction1(nTempCount);
return 0;
}
变量命名规则
int Founction1(int ncount)
{
int i = 0;
int nRet = 0;
for ( i = 1; i < ncount +1; i++)
{
nRet += i;
}
std::cout<<nRet<<std::endl;
return 0;
}
int main(int argc,const
char * argv[]) {
// insert code here...
std::cout <<"Hello, World!\n";
int nTempCount =
100 ;
Founction1(nTempCount);
return 0;
}
变量命名规则
相关文章推荐
- c++异常
- c语言:新颖的进制灵活应用
- 有限状态机
- 编写一个程序,把C语言的声明翻译成通俗语言
- NSString转C语言翻转字符串
- 学习c++的五十条忠告
- C++ Primer Plus Chapter3
- leetcode - Additive Number
- C语言 typedef -----类型定义符的重新声明
- C语言 extern 经常出错的一处
- c++ 动态分配二维数组 new 二维数组
- 【C语言】break,continue的区别
- C++类模板
- neuq oj 1018 A+B again C语言
- VC++深入详解的函数总结
- VS2008下编译C++程序,找不到 stdint.h,原因及解决方案
- offsetof()
- C++友元
- 黑马程序员-C语言02
- C++静态成员