码迷,mamicode.com
首页 >  
搜索关键字:argv    ( 3650个结果
插入排序
1 #include 2 #include 3 4 void insert_sort(int data[], int); 5 6 int main(int argc, char *argv[]) 7 { 8 int i; 9 int data[6] = {5,3,7,10,...
分类:其他好文   时间:2014-09-28 13:25:12    阅读次数:169
删除String中的空格
三种删除String中空格的方法。可用根据需要自由进行选择使用。1、C风格#include "stdafx.h"void RemoveStringSpaces(char* pStr);int _tmain(int argc, _TCHAR* argv[]){ return 0;}void Re...
分类:其他好文   时间:2014-09-28 01:37:10    阅读次数:219
c语言常见编程
//一个猴子第一天偷了a个桃子,吃了一半又多吃了一个,第二天又吃了一半还多吃了一个,一直下去,直到第十天,只有一个桃子了。求第一天的桃子数量# import "stdio.h"int main(int argc, char * argv[]){ int x2,x1,day=9; x2=1...
分类:编程语言   时间:2014-09-27 21:30:10    阅读次数:268
OC笔记-4
#inport<Foundation/Foundation.h> int?main(int?argc,?char?*argv[]) { ????const?char?*words[4]?=?{"abc",?"def",?"ghi"};????//定义字符串数组 ????int?wordCount?=?4; ???? ...
分类:其他好文   时间:2014-09-27 16:39:40    阅读次数:133
IPhone打包工具脚本
(后面就是代码了,我就不翻译了。)#!/usr/bin/perl use File::Copy; my $installPath = $ARGV[0]; #the name that displays on the iPhone my $bundleDisplay...
分类:其他好文   时间:2014-09-27 13:43:49    阅读次数:183
快速排序
#include #include #include void quick_sort(int data[], int, int);int partition(int data[], int, int);int main( int argc, char* argv[] ) { int data[8] ...
分类:其他好文   时间:2014-09-27 00:09:38    阅读次数:308
QT学习笔记_布局
布局大致分水平布局,竖直布局 ,网格布局等等。。 #include #include //布局 #include //滑块 #include //微调框 #include //标签 int main(int argc,char *argv[]) { QApplication app(argc,argv); QWidget *w=new QWidget; w->setWi...
分类:其他好文   时间:2014-09-26 23:24:28    阅读次数:301
5-2-2 printf参数从右往左压栈
5-2-2 C中printf计算参数时是从右到左压栈的 #include int main (int argc, char **argv) { int b = 3; int arr[] = {6,7,8,9,10}; int *ptr = arr; // *(ptr++) += 123; // pr...
分类:其他好文   时间:2014-09-26 22:32:28    阅读次数:205
QT学习笔记_建立连接
所谓建立连接,即用户对某个按钮点击之后程序要做出的响应。这次写了一个退出按钮。 //建立连接 即响应事件 #include #include int main(int argc,char *argv[]) { QApplication app(argc,argv); QPushButton *button=new QPushButton("Quit"); QObject::connec...
分类:其他好文   时间:2014-09-26 19:50:18    阅读次数:132
linux system program的几个验证
验证了main的输入参数是按照空格来分的,如执行test程序,输出命令行参数。 ./test    1,1     2 参数argv[0]是./test 参数argv[1]是1,1 参数argv[2]是2  如果在参数列表中出现诸如“;”“空格”等字符。可以再前面加上转义字符“\”进行转义处理。如 ./test    1\;1    12 第二个参数是1;1 验证了main...
分类:系统相关   时间:2014-09-26 11:15:08    阅读次数:258
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!