2014年2月22日
摘要: 1、基本框架 import java.oi.*; import java.util.* public class Main { public static void main(String args[]) { Scanner cin = new Scanner(System.in)); } } 2、Java的输入 读一个整数:int n = cin.nextInt(); 相当于scanf("%d", &n);或 cin 》 n; 读一个字符串:String s = cin.next(); 相当于scanf("%s", s);或 cin 》 s; 阅读全文
posted @ 2014-02-22 10:40 程序点滴 阅读(509) 评论(0) 推荐(0) 编辑
摘要: typedef 及其与struct的结合使用1 //相当于为现有类型创建一个别名,或称类型别名。2 //整形等3 typedef int size;456 //字符数组7 char line[81];8 char text[81];//=>910 typedef char Line[81];11 Line text, secondline;121314 //指针15 typedef char * pstr;16 int mystrcmp(pstr p1, pstr p2);//注:不能写成int mystrcmp(const pstr p1, const pstr p3);因const 阅读全文
posted @ 2014-02-22 10:36 程序点滴 阅读(248) 评论(0) 推荐(0) 编辑

全讯网   全讯网