上一页 1 ··· 4 5 6 7 8 9 下一页

30

摘要: #include <iostream>using namespace std; struct Aircraft { int wingspan; int passengers; union { float fuelLoad; float bombLoad; int pallets; };} fight 阅读全文
posted @ 2017-03-29 16:15 tuzhuo 阅读(71) 评论(0) 推荐(0) 编辑

28

摘要: #include <iostream> using namespace std; typedef struct mytype{ int a; float b;}; int main(int argc, char *argv[]){ mytype obj; obj.a=6; obj.b=1.4;ex 阅读全文
posted @ 2017-03-29 16:14 tuzhuo 阅读(74) 评论(0) 推荐(0) 编辑

29

摘要: #include <iostream>#include <cstring> using namespace std; struct books{ char name[50]; char author[50];}; void printBook( struct books *book ) { cout 阅读全文
posted @ 2017-03-29 16:14 tuzhuo 阅读(58) 评论(0) 推荐(0) 编辑

【转载】关于c++中的explicit

摘要: 按照默认规定,只有一个参数的构造函数也定义了一个隐式转换,将该构造函数对应数据类型的数据转换为该类对象,如下面所示: class String { String ( const char* p ); // 用C风格的字符串p作为初始化值 //… } String s1 = “hello”; //OK 阅读全文
posted @ 2017-03-24 15:51 tuzhuo 阅读(122) 评论(0) 推荐(0) 编辑

ubuntu中文字符集格式转换

摘要: TZ 于 华中农业大学逸夫楼 阅读全文
posted @ 2017-03-24 15:13 tuzhuo 阅读(107) 评论(0) 推荐(0) 编辑

QQ_SingleTalkClient

摘要: package test_teacher;import java.io.*;import java.net.*;public class SingleTalkClient{ public static void main(String[] args) throws IOException { Soc 阅读全文
posted @ 2017-03-22 18:56 tuzhuo 阅读(139) 评论(0) 推荐(0) 编辑

QQ_MultiTalkServer

摘要: package test_teacher;import java.net.*;import java.io.*;public class MultiTalkServer{ public static void main(String[] args) throws IOException { Serv 阅读全文
posted @ 2017-03-22 18:55 tuzhuo 阅读(180) 评论(0) 推荐(0) 编辑

24(java_io from keyboard)

摘要: public class ReadFromKB{ public static void main(String args[]) { try { byte bArray[]=new byte[128]; String str; System.out.println("Enter something U 阅读全文
posted @ 2017-03-19 10:33 tuzhuo 阅读(97) 评论(0) 推荐(0) 编辑

23(java/io/data_io)

摘要: package test_ppt;import java.io.*;public class test_ppt{ public static void main(String args[]) throws IOException { FileOutputStream fos = new FileOu 阅读全文
posted @ 2017-03-19 10:16 tuzhuo 阅读(101) 评论(0) 推荐(0) 编辑

22

摘要: package test3; import java.io.*;public class test3{ public static void main(String args[]) { try { System.out.print("Input: "); int count,n=512; byte 阅读全文
posted @ 2017-03-19 09:18 tuzhuo 阅读(92) 评论(0) 推荐(0) 编辑

21

摘要: package freshman; import java.awt.*;import javax.swing.*; public class LottoMadness extends JFrame { // set up row 1 JPanel row1 = new JPanel(); Butto 阅读全文
posted @ 2017-03-11 21:47 tuzhuo 阅读(87) 评论(0) 推荐(0) 编辑

20

摘要: package room1; import java.time.*;import java.time.temporal.*; class Clock { public static void main(String[] arguments) { // get current time and dat 阅读全文
posted @ 2017-03-11 21:46 tuzhuo 阅读(91) 评论(0) 推荐(0) 编辑

18

摘要: package room1;class Employee{ String name; int age; String designation; double salary; // This is the constructor of the class Employee public Employe 阅读全文
posted @ 2017-03-11 21:45 tuzhuo 阅读(63) 评论(0) 推荐(0) 编辑

19

摘要: package room1; class circle{ public static double pi=3.1415926535; float radius; float x,y; circle(float r,float x,float y){ radius=r; this.x=x; this. 阅读全文
posted @ 2017-03-11 21:45 tuzhuo 阅读(81) 评论(0) 推荐(0) 编辑

16

摘要: package arraylistlearning; import java.awt.*; public class Point3D extends Point { public int z; public Point3D(int x, int y, int z) { super(x,y); thi 阅读全文
posted @ 2017-03-11 21:44 tuzhuo 阅读(74) 评论(0) 推荐(0) 编辑

17

摘要: package arraylistlearning;public class MyPoint4D extends Point3D{ public int t; public MyPoint4D(int x, int y, int z,int t) { super(x, y, z); if(t<0) 阅读全文
posted @ 2017-03-11 21:44 tuzhuo 阅读(70) 评论(0) 推荐(0) 编辑

15

摘要: package arraylistlearning; public class Point4DTester { public static void main(String[] arguments) { MyPoint4D object1 = new MyPoint4D(10,22,71,26); 阅读全文
posted @ 2017-03-11 21:43 tuzhuo 阅读(84) 评论(0) 推荐(0) 编辑

12

摘要: package arraylistlearning; import java.util.*; public class StringLister { String[] namesy = { "Spanky", "Alfalfa", "Buckwheat", "Daria","Stymie", "Ma 阅读全文
posted @ 2017-03-11 21:42 tuzhuo 阅读(88) 评论(0) 推荐(0) 编辑

14

摘要: package arraylistlearning; import java.awt.*; public class PointTester { public static void main(String[] arguments) { Point location1 = new Point(11, 阅读全文
posted @ 2017-03-11 21:42 tuzhuo 阅读(65) 评论(0) 推荐(0) 编辑

13

摘要: package arraylistlearning; import java.util.*; public class StringLister { String[] namesy = { "Spanky", "Alfalfa", "Buckwheat", "Daria","Stymie", "Ma 阅读全文
posted @ 2017-03-11 21:42 tuzhuo 阅读(75) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页