#import #import "Person.h"#import "BankAccount.h"int main(int argc, const char * argv[]){// 实例化一个人, 表示是这个名字叫wangdelong的人, 准备在银行开户 Person *person = [[....
分类:
其他好文 时间:
2014-07-19 21:38:02
阅读次数:
272
1、使用FindWindow函数获取窗口句柄示例:使用FindWindow函数获取窗口句柄,然后获得窗口大小和标题,并且移动窗口到指定位置。[html] view plaincopy#include#include#include#includeintmain(intargc,char*argv[]...
分类:
其他好文 时间:
2014-07-19 20:20:20
阅读次数:
170
1. 顺序容器的初始化操作1.1 顺序容器(vector,list,deque)的五种初始化方法,以 vector 为例。#include #include #include using namespace std;int main(int argc, const char *argv[]){ .....
分类:
编程语言 时间:
2014-07-19 19:27:08
阅读次数:
278
file/filetype.c #include "apue.h"intmain(int argc, char *argv[]){ int i; struct stat buf; char *ptr; for (i = 1; i < argc; i++) { printf("%s: ", argv[...
分类:
其他好文 时间:
2014-07-18 23:38:27
阅读次数:
412
#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[]){ int a = 1, b = 1, c = 0; int max = 0x7FFFFFFF; printf("%d\n", max);// 打印一下整型的最大值 ...
分类:
其他好文 时间:
2014-07-18 23:36:57
阅读次数:
191
file/fileflags.c #include "apue.h"#include intmain(int argc, char *argv[]){ int val; if (argc != 2) err_quit("usage: a.out "); if ((val = fcntl(atoi(a...
分类:
其他好文 时间:
2014-07-18 23:28:24
阅读次数:
203
创建testimg.pyimport sysfrom PIL import Image img = Image.open(sys.argv[1]).convert('YCbCr') w, h = img.size data = img.getdata() cnt = 0 ...
分类:
编程语言 时间:
2014-07-18 19:19:52
阅读次数:
358
最近在写程序的过程中,把一部分时间都花费在程序对参数的处理上。今天听了学长说到getopt函数,才发现原来c里面还有一个专门解决参数处理的函数,查询了相关资料,这里简单总结一下。使用int main( int argc, char *argv[] )(或int main( int argc, cha...
分类:
其他好文 时间:
2014-07-18 14:17:53
阅读次数:
227
fopen打开配置文件,不需要绝对路径,可以使相对路径fgets按行读取文件while(fgets(buf, 1024, fptr)){}strtok_r或者strtok解析参数 int main(int argc, char *argv[]) { ...
分类:
其他好文 时间:
2014-07-18 12:14:09
阅读次数:
187
file/ls1.c 1 #include "apue.h" 2 #include 3 int 4 main(int argc, char *argv[]) 5 { 6 DIR *dp; 7 struct dirent *dirp; 8 if (...
分类:
其他好文 时间:
2014-07-14 14:20:31
阅读次数:
186