码迷,mamicode.com
首页 >  
搜索关键字:argv    ( 3650个结果
好玩的代码(1)
看效果(gif工具不太会用,效果不是很好)代码很简单,就是对sleep函数和/b的使用。代码 1 #include 2 #include 3 using namespace std; 4 5 int main(int argc, char **argv) 6 { 7 printf("C...
分类:其他好文   时间:2014-10-09 20:34:17    阅读次数:201
黑马程序员___Foundation__NSFileManager和NSFileHandle
------Java培训、Android培训、iOS培训、.Net培训、期待与您交流! -------//NSFileManager#import #define PATH @"/Users/fengze/Desktop"int main(int argc, const char * argv[])...
分类:其他好文   时间:2014-10-09 14:18:23    阅读次数:225
黑马程序员___OC__归档
------Java培训、Android培训、iOS培训、.Net培训、期待与您交流! -------将数据以一定的格式写到文件,等到需要用的时候直接按照原来的形式读出来,这种方式叫做归档#import int main(int argc, const char * argv[]) { @au...
分类:其他好文   时间:2014-10-09 13:40:23    阅读次数:181
将十进制转换成二进制输出,递归写法
#include #include #include void binary_num(int, int);int main( int argc, char* argv[] ) { int a = 30; binary_num(a, sizeof(a) * 8); print...
分类:其他好文   时间:2014-10-09 01:27:27    阅读次数:204
strcpy拷贝的是一个有符号的字符字符串,而不是一个无符号的字符串
#include"stdafx.h"#include<stdio.h>#include<stdlib.h>#include<string.h>#pragmapack(1)typedefstructEMPTYSTRUCT{inta;charb;unsignedcharcLeadingCharacter[4];}EmptyStruct;int_tmain(intargc,_TCHAR*argv[]){EmptyStructemptystruct;memset(&empt..
分类:其他好文   时间:2014-10-08 00:19:34    阅读次数:1044
Linux基础——socket简单实现与其他IP的聊天
进程实现版服务器端: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 int main(int argc,char *argv[...
分类:系统相关   时间:2014-10-07 17:44:43    阅读次数:249
类型转换
int main (int argc, char **argv) { unsigned int a = 0xFFFFFFF7; unsigned char i = (unsigned char)a; char* b = (char*)&a; printf("i = %08x\nb = %08x\n"...
分类:其他好文   时间:2014-10-07 11:07:23    阅读次数:149
C++库研究笔记--用__attribute__((deprecated)) 管理过时代码
用__attribute__((deprecated)) 管理过时代码,同时保留兼容的接口 Linux下: #define DEPR_AFTER __attribute__((deprecated)) #define DEPR_BEFOR class DEPR_BEFOR AAA { }DEPR_AFTER; int main(int argc, char** argv) {...
分类:编程语言   时间:2014-10-06 17:01:50    阅读次数:173
栈和堆的地址哪个高
我们都知道,堆是向到高地址扩展的,栈是向低地址扩展的,那么堆和栈的地址那个高呢?int _tmain(int argc, _TCHAR* argv[]){ int stack_val = 0; int* heap_ptr = new int(2); printf("stack ad...
分类:其他好文   时间:2014-10-04 22:33:17    阅读次数:208
Lua2.4 编译器入口 luac.c
luac.c 是编译器 luac 的入口文件。 老规矩,从 main 函数看起,看看这个过程中程序都做了些什么? int?main(int?argc,?char*?argv[]) { ?char*?d="luac.out";????????????/*?default?outpu...
分类:其他好文   时间:2014-10-04 19:56:07    阅读次数:498
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!