zoukankan      html  css  js  c++  java
  • 命名规则

    命名规则

    比较著名的命名规则当推 Microsoft 公司的“匈牙利”法,该命名规则的主要思想是 “在变量和函数名中加入前缀以增进人们对程序的理解 ”。例如所有的字符变量均以 ch 为前缀,若是指针变量则追加前缀 p。如果一个变量由 ppch 开头,则表明它是指向字符 指针的指针。

     1 #include <iostream>
     2 
     3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
     4 using namespace std;
     5 int main(int argc, char** argv) {
     6      //声明变量语句中使用顺序运算
     7     int x, y;
     8 
     9     //计算中使用顺序运算
    10     x=50; 
    11     y=(x=x-5, x/5); 
    12     cout<<"x="<<x<<endl;
    13     cout<<"y="<<y<<endl;
    14     return 0;
    15 }
  • 相关阅读:
    2017.3.13-afternoon
    2017.3.13-morning
    2017.3.10-afternoon
    2017.3.10-morning
    2017.3.9-afternoon
    2017.3.9-morning
    神经网络入门
    webpack 安装
    git 常用命令
    mysql 用户管理和权限设置
  • 原文地址:https://www.cnblogs.com/borter/p/9406171.html
Copyright © 2011-2022 走看看