| PNY Key Attache 16GB |
最近在 Y 購物上買了這款便宜的隨身碟 NT.259,拿到後
馬上格式化成 NTFS 16K,再用 CrystalDiskMark 3.0.1 跑效能測試,
發現讀的速度還不錯 23MB/s,不過寫也太爛了,只有 4.7MB/S,
感覺是平均市售隨身碟的一半速度...
果然還是一分錢一分貨阿!
不過這也不一定準,
實際存 2~3 G 的檔案時跑到 100M~20M 左右還不錯,
但存幾百M但檔案都很小又多時,速度還會掉到幾十 K...
![]() |
| 評測結果 |
class A
{
public:
void print() {printf ("print() From class A\n");};
protected:
void print2() {printf ("print2() From class A\n");};
private:
void print3() {printf ("print3() From class A\n");};
};
class PublicB : public A
{
public:
int print() {printf ("print() From class B\n"); print2();}; // Redefine
/* 注意: protected 的 print2() 雖被繼承下來, 但不為外人所用 */
/* 注意: private 的 print3() 並沒有被繼承下來 */
};
class ProtectedB : protected A
{
public:
/* 注意: public 的 print() 雖被繼承下來, 但此時已變為 protected */
/* 注意: protected 的 print2() 雖被繼承下來, 但不為外人所用 */
/* 注意: private 的 print3() 並沒有被繼承下來 */
};
class PrivateB : private A
{
public:
void myPrint() {print(); print2();};
/* 注意: public 的 print() 雖被繼承下來, 但此時已變為 private */
/* 注意: protected 的 print2() 雖被繼承下來, 但此時已變為 private */
/* 注意: private 的 print3() 並沒有被繼承下來 */
};
int main()
{
A clsA;
clsA.print();
//clsA.print2(); // Compiler Error! print2() is protected.
PublicB clsB_pub;
clsB_pub.print();
//clsB_pub.print2(); // Compiler Error! print2() is protected.
ProtectedB clsB_pro;
//clsB_pro.print(); // Compiler Error! print() is protected.
//clsB_pro.print2(); // Compiler Error! print2() is protected.
PrivateB clsB_pri;
clsB_pri.myPrint();
system("pause");
}
class A
{
private:
int number;
public:
A(int value){number=value;};
void const_f(void) const {/*number=1;*/}; // 不能對成員變數賦值
void nonconst_f(void){number=1;};
};
int main()
{
const A a(1);
a.const_f();
a.nonconst_f(); // 編譯錯誤: const 物件只能引用 const 函式
return 0;
}