c++中cstdio與stdio.h的作用

//#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
    char name1[100],name2[100];
    cin>>name1>>name2;
    cout<<name1<<
    endl<<
    endl;
    printf("hahaha");
    cout<<"雖然不知道能不能進複試但是還是要學c++呀"<<endl;
    return 0;
}

在裏面我發現有iostream的話沒有cstdio都可以使用輸入輸出語句,printf和cout都沒有問題。

把cstdio留下但是iostream不保留,就會報錯。可見,cstdio的作用不是很明顯,但是iostream的用處很大,所以剛開始學習的時候還是先把iostrem寫上。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章