码迷,mamicode.com
首页 >  
搜索关键字:visaul stdio    ( 10042个结果
用c语言写一个函数把十进制转换成十六进制(转)
#include"stdio.h"intmain(){intnum=0;inta[100];inti=0;intm=0;intyushu;charhex[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};pri...
分类:编程语言   时间:2014-12-30 16:53:42    阅读次数:347
sicily 1176 two ends
动态规划问题,每一步都分两种情况,然后选出最合适的那种 #include "iostream" #include "memory.h" #include "stdio.h" using namespace std; const int MAX = 1005; int dp[MAX][MAX]; int largest; int arr[MAX]; int call(int start...
分类:其他好文   时间:2014-12-28 13:00:31    阅读次数:132
协议实现:如何实现一个最简单的通信协议(线程模拟)
/* *Author:DavidLin *Date:2014-12-20pm *Email:linpeng1577@163.comorlinpeng1577@gmail.com *world:thecityofSZ,inChina *Ver:000.000.001 *For:threadsforrxtx! *history:editortimedo *1)LinPeng2014-12-20createdthisfile! *2) */ #include<stdio.h> #include<..
分类:编程语言   时间:2014-12-28 01:51:42    阅读次数:174
C语言原型模式
不知道为什么,我的代码运行提示段错误。 #include?<stdio.h> #include?<stdlib.h> #include?<string.h> #include?<assert.h> typedef?struct?_Person?{ ????const?char?*name; ????int?age?...
分类:编程语言   时间:2014-12-27 17:44:32    阅读次数:159
函数指针
/*Author:Choas?Lee *Date:2012-02-28 */ #include<stdio.h> #include<stdlib.h> #include<string.h> float?add(float?a,float?b){return?a+b;} float?minus(float?a,float?b){return?a-b;} fl...
分类:其他好文   时间:2014-12-27 11:32:04    阅读次数:183
C语言中的运算
C语言有34中运算符,包括了常见的加减乘除等运算取余运算%:取余结果的正负性的值跟%左边数的值有关算术运算:/*提示用具输入一个时间的秒数,比如500秒就输入500,然后输出对应的分钟和秒,比如500秒就是8分20秒*/#include<stdio.h>Intmain(){//定义一个变量接受输入的..
分类:编程语言   时间:2014-12-27 06:50:38    阅读次数:183
线程传递参数
#include "stdio.h"#include "unistd.h"#include "pthread.h"void *func(void *p){ int i; int *a=(int*)p; for (i=0; i<20; i++) { a[i]=100+i; slee...
分类:编程语言   时间:2014-12-26 16:19:48    阅读次数:125
16进制显示文件内容
#include?<iostream> #include?<stdio.h> using?namespace?std; #define?BUFF_SIZE?20 int?main?() { FILE?*fp; fp?=?fopen("epp370p0190_0408.1399259732.exe",?"rb"); int?c; int?buf[BUF...
分类:其他好文   时间:2014-12-25 22:18:32    阅读次数:165
C++ 获取进程路径
下面的实例可以简便实现这个功能。 #include<stdio.h> #include<windows.h> intmain() { charstr[MAX_PATH]; GetModuleFileName(NULL,str,MAX_PATH); puts(str); return0; }另外,想要枚举系统里面全部的进程,可以使用如下方式,关键是CreateToolhelp32Snapshot函..
分类:编程语言   时间:2014-12-25 18:40:00    阅读次数:259
C 语言中的内存分析
C语言中的内存分析一、进制我们需要了解的4中进制:二进制、八进制、十进制、十六进制#include<stdio.h>intmain(){//默认情况下是十进制intnumber=12;//二进制intnumber2=0b1100;//八进制intnumber3=014;//十六进制intnumber=0xc;return0;}Printf以不同进制形式输出的类..
分类:编程语言   时间:2014-12-24 12:03:23    阅读次数:186
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!