// explicit.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#includeclass MyClass { public: /*explicit*/ MyClass( int num ) { }}; int _tmain(int argc, _TCHA....
分类:
编程语言 时间:
2015-03-20 23:17:57
阅读次数:
167
1.编写hello.m1 #import 2 3 int main (int argv, const char **argc)4 {5 @autoreleasepool {6 NSLog(@"Hello, world!");7 }8 return 0;9 }2...
分类:
其他好文 时间:
2015-03-20 20:16:16
阅读次数:
98
NSNumber类NSFormatter#import int main(int argc, const char * argv[]) {
@autoreleasepool { NSLog(@"1******************* NSFormatter ***********************"); N...
分类:
其他好文 时间:
2015-03-20 10:58:23
阅读次数:
148
1.指针数组:顾名思义,指针数组就是数组里面元素都是指针,代码如下:#include int main(int argc, const char * argv[]) { // insert code here... //printf("Hello, World!\n"); int ...
分类:
编程语言 时间:
2015-03-20 06:42:01
阅读次数:
158
分支语句if
#import
int mainj (int argc,const char * argv[] ){
@autoreleasepool {
int a = 1;
NSLog(@"a的值为%d",a);
int b = 2;
NSLog("b的值为%d",b);
if(a>b){
NSLog(@"这句话是真的!");
}
NSLog(@"hehe");
...
分类:
其他好文 时间:
2015-03-19 20:24:30
阅读次数:
205
m是OC源文件扩展名,入口点也是main函数,第一个OC程序:#import int main(int argc, const char * argv[]){theme manager @autoreleasepool { NSLog(@"Hello, World!"); } return 0;}预...
分类:
其他好文 时间:
2015-03-19 18:06:00
阅读次数:
146
错误代码如下示:#include #include #include void get_memory(char *p, int num){ p = (char *)malloc(sizeof(char)*num);}int main(int argc,char *argv[]){ char *s.....
分类:
其他好文 时间:
2015-03-19 10:00:41
阅读次数:
134
通过MediaServer详细解析Binder内部实现细节。1. MediaServer的入口函数int main(int argc, char** argv) { sp proc(ProcessState::self()); //获得一个ProcessState实例 // ...
分类:
其他好文 时间:
2015-03-19 09:58:55
阅读次数:
219
Linux提供了一个解析命令行参数的函数。 #include <unistd.h>
int getopt(int argc, char * const argv[],
const char *optstring);
extern char *optarg;
exte...
分类:
其他好文 时间:
2015-03-19 08:56:00
阅读次数:
148
PHP编程中经常需要用到一些服务器的一些资料,特把$_SERVER的详细参数整理下,方便以后使用。 $_SERVER['PHP_SELF'] #当前正在执行脚本的文件名,与 document root相关。 $_SERVER['argv'] #传递给该脚本的参数。 $_SERVER['argc...
分类:
其他好文 时间:
2015-03-18 19:48:42
阅读次数:
127