#include <stdio.h>   包含輸出入函式庫

#include <stdlib.h> C++標準庫文件之一,包含大量函數原型

#include <conio.h> DOS視窗輸出入函數庫,基本上<stdio.h>都有,但還是要看編譯工具

#include <iostream> 標準的輸入(cin)/輸出(cout)流 標頭文件,C++最基本添加文件。

舊C++用iostream.h,為了和C區隔C++已經不支援.h的標頭文件
使用<iostream>宣告還要加上using namespace std

P.S:iostream為input output stream簡寫

舉例:方法一

#include  <iostream> 

using  namespace  std; 

void  main()  

{

cout  <<  "hello!"  <<  endl; 

}

方法二:不用using  namespace  std

std::cout  <<  "hello!"  <<endl;

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 winage 的頭像
    winage

    winage的部落格

    winage 發表在 痞客邦 留言(0) 人氣()