码迷,mamicode.com
首页 >  
搜索关键字:java学习笔记 main    ( 66244个结果
Android-NDK处理用户交互事件
在 android_main(struct android_app* state)函数里面设置输入事件处理函数:state->onInputEvent = &handleInput;//设置输入事件的处理函数,如触摸响应函数介绍:AMotionEvent_getX():以屏幕左上角为原点,是绝对坐标...
分类:移动开发   时间:2014-05-23 09:29:18    阅读次数:585
【C++基础】关键字static 局部变量
1.局部变量static局部变量和普通局部变量有什么区别:static局部变量只被初始化一次,下一次依据上一次结果值;int test(int j){static int i=10;i=i+j;return i;}int main(void){ ////美图秀秀笔试 int m=test(12);....
分类:编程语言   时间:2014-05-23 09:17:44    阅读次数:354
【动态规划初级】 BadNeighbors
目录最大连续序列和不连续序列的最大和1.最大连续序列和是指所有连续子序列元素和最大的那个。#include#includeusing namespace std;int main(){ freopen("in.txt","r",stdin); int n; while(cin>>n) { int a...
分类:其他好文   时间:2014-05-22 11:49:54    阅读次数:273
main()函数中argv的理解及赋值
一、理解 C编译器允许main()函数没有参数,或者有两个参数(有些实现允许更多的参数,但这只是对标准的扩展)。参数argc(argument count)是int类型,表示命令行中的字符串数;argv(argument value)是一个指向字符串的指针数组。命令行中的每个字符串被存储到内存中,....
分类:其他好文   时间:2014-05-22 04:08:58    阅读次数:260
Java当中的异常(一)
1. 什么是异常2. 异常的分类3. try...catch..finally结构的使用方法1. 什么是异常 异常:中断了 正常指令流的 事件 异常 是在程序运行的时候产生的 1 class Test{2 public static void main(String args []){3 ...
分类:编程语言   时间:2014-05-22 03:33:39    阅读次数:346
关于c中 int, float, double转换中存在的精度损失问题
先看一段代码实验:#include#includeusing namespace std;int main(){ unsigned int i = numeric_limits::max(); float f = i; unsigned int j = (unsigned int ...
分类:其他好文   时间:2014-05-22 00:48:31    阅读次数:286
hdu1022 train problem 栈的应用
#include #include #include using namespace std;int main(){ int n; while(cin >> n) { stack one; string od1,od2; bool stat...
分类:其他好文   时间:2014-05-21 23:48:58    阅读次数:370
编程题:输入一串字符,程序会自动将大写字母转换为小写
编程题:输入一串字符,程序会自动将大写字母转换为小写#include<stdio.h>#include<conio.h>main(){ inti=0; chara[50],ch; printf("输入一串字符,程序会自动将大写字母转换为小写\n"); printf("按任意键继续,按Esc键退出\n"); while(ch=getch()!=27) { fflush(..
分类:其他好文   时间:2014-05-21 02:46:26    阅读次数:277
编程题:输入一个数字,实现逆排功能。
编程题:输入一个数字,实现逆排功能。#include<stdio.h>#include<conio.h>fun(intm,char*s){charc;intk,i=10;while(m!=0){k=m%i;*s=k+‘0‘;s++;m=(m-k)/i;}*s=‘\0‘;}main(){intn;chars[81],*p;p=s;printf("enteranumber(>100):");scanf("%d",&n);fun(n,s);p..
分类:其他好文   时间:2014-05-20 17:59:19    阅读次数:232
功能:自动类型转换
功能:自动类型转换#include<stdio.h>main(){floatx,y;longm,n;x=3/2+8/3;y=3.0/2+8/3.0;m=1*2*3*4*5*6*7*8*9;n=1L*2*3*4*5*6*7*8*9;printf("x=%f,y=%f,m=%ld,n=%ld\n",x,y,m,n);}
分类:其他好文   时间:2014-05-20 17:26:32    阅读次数:260
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!