#include using namespace std;/** * this 指针理解
*/class A{ int i;public: void hello(){
couthello();}由于单独开发基于c++的编译器,c++程序翻译成c程序后在,在使用c语...
分类:
编程语言 时间:
2014-05-12 16:34:20
阅读次数:
283
四、递归 递归是函数调用自身的一种特殊的编程技术,其应用主要在以下几个方面: 阶乘
在java当中的基本形式是: Public void mothed(int n){//当满足某条件时: Mothed(n‐1); } 递归二分查找
Java二分查找实现,欢迎大家提...
分类:
编程语言 时间:
2014-05-10 20:13:19
阅读次数:
380
个线程都有一个唯一的 ID 以识别不同的线程,std:thread 类有一个 get_id()
方法返回对应线程的唯一编号,你可以通过 std::this_thread 来访问当前线程实例,下面的例子演示如何使用这个 id:#include
#include #include void hello....
分类:
其他好文 时间:
2014-05-10 19:36:43
阅读次数:
281
欧几里得算法求最大公约数算法思想:
求p和q的最大公约数,如果q=0,最大公约数就是p;否则,p除以q余数为r,p和q的最大公约数即q和r的最大公约数。 java实现代码: 1 public
class Demo0 { 2 public static void main(String[] ...
分类:
编程语言 时间:
2014-05-06 09:20:44
阅读次数:
434
使用语句:extern void *malloc(unsigned int
num_bytes);头文件:在TC2.0中可以用malloc.h或 alloc.h (注意:alloc.h 与 malloc.h
的内容是完全一致的),而在Visual C++6.0中可以用malloc.h或者stdlib...
分类:
其他好文 时间:
2014-05-06 00:32:40
阅读次数:
279
调用系统Intent剪裁图片 /** * 调用系统Intent剪裁图片 * @param
context * @param uri * @param w * @param h */ public static void startP...
分类:
移动开发 时间:
2014-05-06 00:29:43
阅读次数:
441
public static void readAsFile(InputStream inStream,
File file) throws Exception {//读取网络InputStream FileOutputStream outStream = new
FileOutput...
分类:
其他好文 时间:
2014-05-06 00:28:20
阅读次数:
376
1、权限2、代码public void setPhoneMusic() {
//设置当前文件存放音乐为手机铃声 Intent intent = new
Intent(RingtoneManager.ACTION_RINGTONE_PICKER); //打开系统...
分类:
其他好文 时间:
2014-05-06 00:27:49
阅读次数:
305
// Test.cpp : 定义控制台应用程序的入口点。//#include
"../I_Timer.H"#include void onTimer1(){ std::cout createTimer();#if 1 auto
myTimer1 = /*Timer::createTime...
分类:
其他好文 时间:
2014-05-05 23:28:48
阅读次数:
341
public class cal{public static void main(String[]
args){calculator ca=new calculator();byte[] first=new byte[4];byte[] second=new
byte[4];System.out.p...
分类:
其他好文 时间:
2014-05-02 15:23:23
阅读次数:
395