码迷,mamicode.com
首页 >  
搜索关键字:argv    ( 3650个结果
利用OC实现C语言中的strtok功能
#import<Foundation/Foundation.h> intmain(intargc,constchar*argv[]) { @autoreleasepool{ NSString*tempStr; //将要分割的字符串 NSMutableString*mutableString=[[NSMutableStringalloc]initWithString:@"hello,world!nihao"]; //分割字符串的字符集 NSCharacterSe..
分类:编程语言   时间:2014-09-21 21:26:32    阅读次数:250
C函数类型和函数指针使用方法详解
二、通常的函数调用一个通常的函数调用的例子:/* 自行包含头文件 */void MyFun(int x); /* 此处的声明也可写成:void MyFun(int) */int main(int argc, char* argv[]){ MyFun(10); /* 这里是调用MyFun(10) 函数...
分类:其他好文   时间:2014-09-21 14:59:30    阅读次数:250
从 mian 函数开始一步一步分析 nginx(一)
如不做特殊说明,本博客所使用的 nginx 源码版本是 1.0.14我们先贴出 main 函数的部分代码: 205 int ngx_cdecl 206 main(int argc, char *const *argv) 207 { 208 ngx_int_t i; 209...
分类:其他好文   时间:2014-09-20 15:41:29    阅读次数:391
关于script,first,second,third=argv运行出错的问题
from sys import argvinput(argv)#python自带的IDLE直接执行不能提供命令行参数script,first,second,third=argvprint("The script is called:",script)print("Your first variabl...
分类:其他好文   时间:2014-09-20 14:40:48    阅读次数:522
第6章 Web客户端访问
获取web页面#!/usr/bin/envpython importsys,urllib2 req=urllib2.Request(sys.argv[1]) fd=urllib2.urlopen(req) whileTrue: data=fd.read(1024) ifnotlen(data): break sys.stdout.write(data)首先建立了一个urllib2.Request对象,该对象用URL做参数。然后调用urlopen得到..
分类:Web程序   时间:2014-09-20 02:22:57    阅读次数:332
c编程
main 入口参数:argc 和 argv#include void main (int argc, char **argv){ int i; printf("argc:%d\n",argc); for (i=0; i<argc; i++) printf("argv[...
分类:其他好文   时间:2014-09-20 01:02:26    阅读次数:161
函数递归调用
int main(int argc, const char * argv[]) { f(1,1,1000); return 0;}void f(int a,int b,int n){ if (a<n) { printf("%d\n",a); a=a+b; f(b,a,n);...
分类:其他好文   时间:2014-09-19 21:07:06    阅读次数:168
cocos2d-x HTTP操作
上传文件:http://zengrong.net/post/2088.htm#include #include #include int main(int argc, char *argv[]){ CURL *curl; CURLcode res; struct curl_httppos...
分类:其他好文   时间:2014-09-19 19:18:05    阅读次数:168
c语言打印字母三角形
#include int main(int argc, const char * argv[]) { char cost,top; cost=getchar(); if (cost>='a'&&cost='A'&&costj ; k--) { printf(" "); } ...
分类:编程语言   时间:2014-09-18 21:52:24    阅读次数:588
OpenCV打开摄像头失败
#include #include #include #include int main( int argc, char** argv ) { //声明IplImage指针 IplImage* pFrame = NULL; IplImage* pFrImg = NULL; IplImage* pBkImg = NULL; CvMat* pFrameMat =...
分类:其他好文   时间:2014-09-18 19:02:17    阅读次数:256
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!