// cincout過載輸入輸出.cpp : 定義控制台應用程式的入口點。
//#include "stdafx.h"
#include
//#include
#include
using namespace std;
class three_d
friend ostream&operator << (ostream &s, three_d obj);
friend istream&operator >> (istream &s, three_d obj);
};ostream & operator <<(ostream &s, three_d obj)
istream & operator>> (istream &s, three_d &obj)
main()
{three_d a (1,2,3);
cout<>a;
cout<
1>------ 已啟動生成: 專案: cincout過載輸入輸出, 配置: debug win32 ------
1>正在編譯...
1>cincout過載輸入輸出.cpp
1>e:\cygwin\home\something\c++\testpag\新建資料夾\cincout過載輸入輸出\cincout過載輸入輸出\cincout過載輸入輸出.cpp(43) : error c4430: missing type specifier - int assumed. note: c++ does not support default-int
1>e:\cygwin\home\something\c++\testpag\新建資料夾\cincout過載輸入輸出\cincout過載輸入輸出\cincout過載輸入輸出.cpp(46) : error c2593: 'operator >>' is ambiguous
1> e:\cygwin\home\something\c++\testpag\新建資料夾\cincout過載輸入輸出\cincout過載輸入輸出\cincout過載輸入輸出.cpp(34): could be 'std::istream &operator >>(std::istream &,three_d &)'
1> e:\cygwin\home\something\c++\testpag\新建資料夾\cincout過載輸入輸出\cincout過載輸入輸出\cincout過載輸入輸出.cpp(25): or 'std::istream &operator >>(std::istream &,three_d)' [found using argument-dependent lookup]
1> while trying to match the argument list '(std::istream, three_d)'
1>生成日誌儲存在「file://e:\cygwin\home\something\c++\testpag\新建資料夾\cincout過載輸入輸出\cincout過載輸入輸出\debug\buildlog.htm」
1>cincout過載輸入輸出 - 2 個錯誤,0 個警告
********** 生成: 0 已成功, 1 已失敗, 0 最新, 0 已跳過 **********
人生啊,沒有過不去的坎
今天偶然看到一幅畫,讓我感觸頗深。來,先來看看這幅畫。人生何嘗不是這樣,當我們遇到困難的時候,有條件的要上,沒有條件的,創造條件也要上。寒假為什麼別人都回家了,而我們卻在這裡學習。憑什麼?憑什麼你們寒假能在家裡呆著那麼舒坦 而我們卻早起晚歸的學習。知道什麼是公平嗎?難道真的是我們命苦。我們注定一輩子...
年底根本不招人,跳槽就是和自己過不去!這話能信嗎?
一年中求職的最佳時間是什麼時候?這個問題的傳統答案一般為 金三銀四 金九銀十 即一年中的3月 4月 9月 10月,如今是否依舊如此呢,而年底就是不適合跳槽的災難時機?錦囊菌想從不同人群的不同視角來講起 首先對應屆生來說,根據前程無憂和應屆生求職網提供的資料顯示,往年秋招主要集中在10至11月份,9月...
交叉編譯,為什麼需要交叉編譯
本地編譯 本地編譯可以理解為,在當前編譯平台下,編譯出來的程式只能放到當前平台下執行。平時我們常見的軟體開發,都是屬於本地編譯 比如,我們在 x86 平台上,編寫程式並編譯成可執行程式。這種方式下,我們使用 x86 平台上的工具,開發針對 x86 平台本身的可執行程式,這個編譯過程稱為本地編譯。交叉...