瀏覽單個文章
上善若水
Major Member
 

加入日期: Oct 2000
您的住址: AKL
文章: 115
harrisonlin 說的比我清楚,多謝了

1. (就如 harrisonlin 兄所說)
雞婆一下給個例子
std::cout << "lalala" << std::endl;
變成了
using namespace std;
cout << "lalala" << endl;

舊的 standard library (xxx.h) 就不需要 using namespace std; 或 加 std:: 了

2. 變數可使用/代表/儲存的範圍和"精確度"
eg.
int/short -32,768 ~ 32,767 (2 or 4 bytes)
long -2,147,483,648 ~ 2,147,483,647 (usually 4 bytes)
float/single 精確至 6 digits 範圍 1e-37 ~ 1e37 (4 bytes)
double 精確至 10 digits 範圍 1e-308 ~ 1e308 (8 bytes)
註 這些範圍和精確度不一定適用每一種電腦
至於 floating-point (real number) 的儲存/精確度其實不簡單
另有一門學問查查書吧

by the way, I can read/write chinese well, (way better than my english)
I typed in English because I can't input Chinese at uni
看的見中文, 但不能打,
中文退步太多, 而且中文打的很慢, 常注音拼不出來

ps. 我是台灣人(屏東) 只是現在住在鳥不生蛋的地方
     
      
舊 2003-09-23, 07:20 PM #11
回應時引用此文章
上善若水離線中