码迷,mamicode.com
首页 >  
搜索关键字:void    ( 62627个结果
C++11新特性之智能指针
1、shared_ptr:一种计数指针,被指向的对象在引用计数为0时删除。它表示共享的所有权(负责对象的删除销毁)。需要包含,下同。// 定义删除器struct Deleter{public: void operator() (Base *p) { cout p1(n...
分类:编程语言   时间:2015-12-06 01:47:46    阅读次数:208
C语言成长学习题(三)
十、编写一个含有逻辑表达式的程序。 1 #include 2 3 void main(void) 4 { 5 int x; 6 7 x = 1; 8 printf("%d ", x>=0 && x=0 && x3);13 14 x = 0;15 pri...
分类:编程语言   时间:2015-12-06 01:42:41    阅读次数:169
C 语言中用bsearch()实现查找操作
C语言中可以用bsearch()实现二分查找。同qsort()一样,bsearch()也包含在库中,且同样要自定义比较子函数。其原型如下:void *bsearch(const void *key, const void *base, size_t nmem, size_t size, int (*...
分类:编程语言   时间:2015-12-05 23:56:28    阅读次数:395
第一个内核模块
hello.c#include#include#include int init_module(){ printk("hello world!\n"); return 0; }void cleanup_module(){ printk("godbye"); } MODULE...
分类:其他好文   时间:2015-12-05 22:42:38    阅读次数:205
Openjudge NOI题库 ch0111/01 查找最近的元素
总时间限制:1000ms内存限制:65536kB描述在一个非降序列中,查找与给定值最接近的元素。输入第一行包含一个整数n,为非降序列长度。1 2 #include 3 #define maxn 100010 4 int a[maxn]; 5 int n; 6 int cmp(const void.....
分类:其他好文   时间:2015-12-05 22:41:48    阅读次数:274
Openjudge NOI题库 ch0111/07 和为给定数
总时间限制:1000ms内存限制:65536kB描述给出若干个整数,询问其中是否有一对数的和等于给定的数。输入共三行:第一行是整数n(0 2 #include 3 #define maxn 100010 4 int a[maxn]; 5 int cmp(const void *a,const v.....
分类:其他好文   时间:2015-12-05 22:34:57    阅读次数:182
《两个二维数组(矩阵)相乘》
1 //两个二维数组相乘 2 #include 3 #include 4 #define M 2 5 #define N 3 6 //#define P 6 7 void main() 8 { 9 int i,j,k;10 //二维数组A和B求乘积,积放在数组C中11 in...
分类:编程语言   时间:2015-12-05 21:04:33    阅读次数:304
用户输入年,月,日,计算该日是该年的第几天?需要考虑2月份的问题
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //用户输入年,月,日,计算该日是该年的第几天?需要考虑2月份的问题 6 int year...
分类:其他好文   时间:2015-12-05 21:02:00    阅读次数:187
MatchCollection用法
namespace GetImages{ using System; using System.Text.RegularExpressions; public class Example { public void Main() { ...
分类:其他好文   时间:2015-12-05 20:52:51    阅读次数:212
ASP.NET 最全的POST提交数据,和接收数据
//1、对象提交,字典方式 //接口方:public ActionResult GetArry(Car model) public void PostResponse() { HttpWebRequest req = (H...
分类:Web程序   时间:2015-12-05 19:25:24    阅读次数:336
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!