码迷,mamicode.com
首页 >  
搜索关键字:argv    ( 3650个结果
hdu_1022_Train Problem I_(模拟)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1022 题意:有n辆火车,给出入栈和出栈的顺序,编写程序判段出栈是否正确。 样例:3 123 132 是可以的 #include #include #include using namespace std; int main(int argc, char *argv[]) { in...
分类:其他好文   时间:2014-12-22 09:33:55    阅读次数:156
字符串
#define PATH @"/users/yunlong/desktop/file1.rtf"#if 0// 一.NSString不可变字符串int main(int argc, const char * argv[]){ @autoreleasepool {// 1.创建字符串对象 NS...
分类:其他好文   时间:2014-12-21 21:54:03    阅读次数:248
C++里消除Wunused
编译程序时,有一大堆警告总是不爽的。别人的代码也就忍了,不好去改。自己的可没法忍。看看C++里怎么消除Wunused警告。 先来看下面的程序:#include int main(int argc,char **argv){ int a; return 0;}编译的时候,打开所有的...
分类:编程语言   时间:2014-12-20 19:43:16    阅读次数:231
【Qt5开发及实例】3、布局管理之分割窗口QSplitter
首先看看目标效果 代码: #include "mainwindow.h" #include #include #include #include int main(int argc, char *argv[]) { QApplication a(argc, argv); QFont font("ZYSong18030", 12); a...
分类:其他好文   时间:2014-12-20 09:20:43    阅读次数:242
安卓高手之路之ClassLoader(三)
由于看C++和C代码看得很累,很辛苦。上一章终于解脱到java代码中来了。 第一个getClassLoader发生在main的preload方法中,public static void main(String argv[]) {preload();}Java代码staticvoidpreload()...
分类:移动开发   时间:2014-12-19 18:52:54    阅读次数:160
localtime和localtime_r的差别
#include <cstdlib> #include <iostream> #include <time.h> #include <stdio.h> using namespace std; int main(int argc, char *argv[]) { ? ? time_t tNow =time(NULL); ? ? time_t tEnd = tNow + 2500; ?...
分类:其他好文   时间:2014-12-19 16:01:25    阅读次数:180
注册终止函数
当程序结束后,注册的函数还可以执行。 #include #include void aa1(void) { printf("aa1\n"); return; } void aa2(void) { printf("aa2\n"); return; } int main(int argc, char *argv[]) { atexit(aa1); ...
分类:其他好文   时间:2014-12-18 18:54:15    阅读次数:223
Qt5.4中遇到找不到头文件<QApplication>等。。
从新学习Qt时,重装了Qt5.4,当运行Hello World例子时,遇到了下列的情况  #include #include #include int main(int argc, char *argv[]) { QApplication a(argc,argv); QDialog w; QLabel label(&w); label.setText("He...
分类:移动开发   时间:2014-12-18 15:18:06    阅读次数:252
练习1-9
int main(int argc, char** argv) { int nspace = 0; int c; while((c=getchar())!=EOF){ if(c!=' '){ nspace = 0; putc...
分类:其他好文   时间:2014-12-17 22:28:05    阅读次数:231
练习1-10
int main(int argc, char** argv) { int nspace = 0; int c; while((c=getchar())!=EOF){ if(c=='\t') printf("\\t"); if(c=...
分类:其他好文   时间:2014-12-17 22:26:05    阅读次数:192
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!