Tianyu's notes

4 out of 5 dentists recommend this WordPress.com site

some C++ notes from my grade 11

July 14, 2013 · Leave a comment

Java 与 C++中static的用法

Java 建立一个static静态变量的method指这个method不需要创建一个此类的对象即可使用: class Simple{ static void go(){ //这个语句就已经可以直接运行了,不需再创建对象 System.out.println(“Go…”); } } public class Cal{ public static void main(String[] args){ Simple.go(); //调用一个静态(static)方法就是“类名.方法名” } } C++里的static中文叫全局变量,就是在函数外面定义的变量 全局变量只要在一个文件中定义后,在其他需要使用的源文件中只要使用extern关键字,即可在该文件中使用,概括下就是:extern扩展全局变量的作用域 extern in#include “stdio.h”t g_c; //其他文件中定义的全局变量 … Continue reading

July 11, 2013 · Leave a comment

Tsearch

(function() { var cx = '006458616484908826734:b2kcpves4mw'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })();

By Tianyu Guo

Design a site like this with WordPress.com
Get started