码迷,mamicode.com
首页 >  
搜索关键字:visaul stdio    ( 10042个结果
opencv2改变图像像素大小到指定像素并保存改变后的图像
#include #include #include #include #include "stdio.h" using namespace std; using namespace cv; int main(int argc,char *argv[]) { Mat img1=imread("1.JPG"); Mat img2; //将原图像变为40×30...
分类:其他好文   时间:2014-11-14 15:44:32    阅读次数:223
HDU 5101 水二分
给定一些集合,选择两个来自不同集合的数,加和大于k,问有多少种选择方案。 ans=从所有数中选择的两个加和大于k的数的方案数-在同一个集合中选择的两个加和大于k的数的方案数 对所有数据排序后二分找即可 #include "stdio.h" #include "string.h" #include "algorithm" using namespace std; struct n...
分类:其他好文   时间:2014-11-14 15:42:16    阅读次数:145
笔试题目记录
#include"stdio.h" inti=0; intfun(intn) { staticinta=2; //第一次执行到这里时a为2,第二次执行到这里时a为3 a++; returna+n; } voidmain() { intk=5; { inti=2; k+=fun(i);//fun(2)=5 //k=10; } k+=fun(i);//fun(0)=4 //k=14 printf("%d\n",k); }#include"..
分类:其他好文   时间:2014-11-14 10:52:53    阅读次数:140
自定义socket协议(服务端)
自定义协议服务//server.cpp:Definestheentrypointfortheconsoleapplication. // #include"stdafx.h" #include<windows.h> #include<stdio.h> #include<winsock2.h> #pragmacomment(lib,"Ws2_32") #defineSERVER_PORT2000//侦听端口 intmain(intargc,char*ar..
分类:其他好文   时间:2014-11-14 09:19:39    阅读次数:164
c语言_判断例子
例一:#include "stdio.h"int main(){ int i=0; if(i)printf("hi"); if(!i)printf("hi"); return 0;}c语言中0就是false,就不需要打印里面的语句了。结果是:hi
分类:编程语言   时间:2014-11-13 18:19:23    阅读次数:181
Codeforces Round #277 (Div. 2) a
/** ?*?@brief?Codeforces?Round?#277?(Div.?2)?a ?*?@author?xiyan ?*?@created?2014/11/13?11:23 ?*?@edited??2014/11/13?11:24 ?*?@type?math? ?*? ?* ?*/ #include?<stdio.h>...
分类:其他好文   时间:2014-11-13 13:07:39    阅读次数:143
getmask
#include "stdio.h"#include "stdlib.h"#include "string.h"#include "net/if.h"#include "arpa/inet.h"#include "linux/sockios.h"int main(int argc,char *arg...
分类:其他好文   时间:2014-11-12 07:04:46    阅读次数:200
c语言中文件的读写、fp位置操作
#include<stdio.h>#include<stdlib.h>intmain() { FILE*file; file=fopen("./text","rb"); //获取文件长度 fseek(file,0,SEEK_END); inttell_len=ftell(file); fseek(file,0,SEEK_SET); char*buff=(char*)mem_get(char,tell_len+1); intread_len=fread(buff,len,..
分类:编程语言   时间:2014-11-11 23:06:58    阅读次数:423
sprintf函数
功能把格式化的数据写入某个字符串缓冲区。头文件stdio.h原型int sprintf( char *buffer, const char *format, [ argument] … );参数列表buffer:char型指针,指向将要写入的字符串的缓冲区。format:格式化字符串。[argume...
分类:其他好文   时间:2014-11-11 18:43:41    阅读次数:229
exit(-1)或者return(-1)为什么shell得到的退出码是255?
写一段hello world: //?filename:?main.c #include?<stdio.h> int?main(void) { ????printf("hello?wolrd!\n"); ????return(-1);??? } 编译执行:gcc main.c && ./a.out 现在我们看看在当前she...
分类:系统相关   时间:2014-11-10 15:54:30    阅读次数:280
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!