码迷,mamicode.com
首页 >  
搜索关键字:argv    ( 3650个结果
C语言学习--链表
#include "node.h"#include#include//typedef struct _node {// int value;// struct _node *next;//} Node;int main(int agrc,char const *argv[]){ i...
分类:编程语言   时间:2015-04-04 14:50:35    阅读次数:114
杨辉三角
问题:            杨辉三角 #include #include int c(int x, int y); /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) ...
分类:其他好文   时间:2015-04-04 12:19:16    阅读次数:150
c/c++ CopyFile,GetFileAttributes复制文件和更改文件属性
通过使用GetFileAttributes 或者GetFileAttributes函数能够获得文件的属性,CreateFile和SetFileAttributes函数可以设置文件的属性。 例子: #include #include #include #include void _tmain(int argc, TCHAR* argv[]) { WIN32_FIND_DA...
分类:编程语言   时间:2015-04-03 11:24:45    阅读次数:169
(转)winmain和main入口函数比较
C/C++语言中的main函数, 经常带有参数argc, argv, 如下:int main(int argc, char** argv)int main(int argc, char* argv[]) //也可以是wchar_t 或 tcharargc 是指命令行输入参数的个数, argv存储了所...
分类:Windows程序   时间:2015-04-02 18:15:11    阅读次数:217
cpp反汇编之控制结构
控制结构主要是关于  if/else   switch/case 废话不多说。。献上代码及反汇编分析。。 #include int main(int argc , char *argv[]) { int nInt = 9; // if(0 == nInt) __asm { cmp DWORD PTR [EBP - 4h] , 0 ; jle __exit; } // __...
分类:其他好文   时间:2015-04-01 23:52:29    阅读次数:177
回文素数
#include #include int main(int argc, char * argv[]){ int m[16], n, i, t, count = 0; long unsigned a, k; for(n=1; n<256; n++) { k=0; t=1; a=n*n; for(i=0; a!=0; i++) { m[i] = a%10; ...
分类:其他好文   时间:2015-04-01 23:52:18    阅读次数:170
2次使用fork避免产生僵尸进程和不去处理SIGCHLD信号
1.如下代码所示#include #include #include int main(int argc,char *argv[]){ pid_t child = fork(); if( child == -1 ) { //error pri...
分类:系统相关   时间:2015-04-01 16:56:56    阅读次数:189
python获取指定日期的前n天或后n天日期
首先导入time,和datetime包 import datetime import time 实现代码如下: if __name__ == '__main__': dt=sys.argv[1] myday = datetime.datetime( int(dt[0:4]),int(dt[5:7]),int(dt[8:10]) ) + datetime.tim...
分类:编程语言   时间:2015-04-01 11:25:51    阅读次数:211
两个数的最小公倍数
问题:          求两个数的最小公倍数 #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { int m, n, b; i...
分类:其他好文   时间:2015-04-01 00:29:41    阅读次数:180
两个数的最大公约数
问题:           求两个数的最大公约数。 //最大公约数 #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { int ...
分类:其他好文   时间:2015-04-01 00:28:51    阅读次数:119
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!