码迷,mamicode.com
首页 >  
搜索关键字:const 底层const 顶层const    ( 26295个结果
【USACO 1.2.4】回文平方数
【题目描述】回文数是指从左向右念和从右向左念都一样的数。如12321就是一个典型的回文数。给定一个进制B(2 2 #include 3 #include 4 #include 5 #include 6 const int maxl=1000; 7 using namespace std; 8...
分类:其他好文   时间:2014-06-10 08:49:27    阅读次数:180
C++ const用法小结 (欢迎大家拍砖)
C++const 关键字小结const 是constant的缩写,本意是不变的,不易改变的意思。const 在C++中是用来修饰内置类型变量,自定义对象,成员函数,返回值,函数参数。一、const修饰普通类型的变量。如下:1 const int a = 7; 2 3 int b = a; //i.....
分类:编程语言   时间:2014-06-09 20:58:05    阅读次数:281
常量 2014年6月9日08:32:59
class Program { //常量名一般全部大写 //private const double PI = 3.14;//定义常量,private只能类内部使用 public const double PI = 3.14;/...
分类:其他好文   时间:2014-06-09 19:43:08    阅读次数:255
std::function赋值的几种方法
定义:#include std::function myPrintFunction;函数指针void directPrint(const QString &msg){ qDebug()<<"direct print:"<<msg;}myPrintFunction = directPrint;lamb...
分类:其他好文   时间:2014-06-09 17:41:16    阅读次数:267
winform程序静音
using System.Runtime.InteropServices; //命名空间 const uint WM_APPCOMMAND = 0x319; const uint APPCOMMAND_VOLUME_UP = 0x0a; const uint APPCO...
分类:Windows程序   时间:2014-06-09 17:12:04    阅读次数:341
const的使用总结(转载)
C++中的const关键字的用法非常灵活,而使用const将大大改善程序的健壮性,本人根据各方面查到的资料进行总结如下,期望对朋友们有所帮助。Const是C++中常用的类型修饰符,常类型是指使用类型修饰符const说明的类型,常类型的变量或对象的值是不能被更新的。一、Const作用如下表所示:N.....
分类:其他好文   时间:2014-06-09 16:42:38    阅读次数:330
[ C++ ] 理解const
C++中const的用法, 使用规则, 以及记忆方法.
分类:编程语言   时间:2014-06-09 13:36:03    阅读次数:285
poj1611
0号患了病毒,只要和0号一组的人同样会患病毒。。。。#include #include #include int bin[30010];int q[30010]; int n,m; int cmp(const void *a,const void *b){ return *(int *)a...
分类:其他好文   时间:2014-06-09 13:34:51    阅读次数:232
[LeetCode OJ] Max Points on a Line—Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
//定义二维平面上的点struct Point{ int x; int y; Point(int a=0, int b=0):x(a),y(b){}};bool operator==(const Point& left, const Point& right){ return...
分类:其他好文   时间:2014-06-08 22:26:17    阅读次数:357
简单排序poj2388
#include #include #include #include using namespace std;int cmp(const void *a,const void *b){ return *(int *)a-*(int *)b;}int main(){ int n; ...
分类:其他好文   时间:2014-06-08 20:51:16    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!