stdio.h和iostream有什么区别? [英] What The Difference between stdio.h and iostream?

查看:963
本文介绍了stdio.h和iostream有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#include<stdio.h>
int main ()
{
    // code
}
return 0 ;





#include<iostream>
int main ()
{
    // code
}

哪个库最适合使用?

什么是最好的?为什么?当我编写代码时,它们之间的功能有什么区别?

What is the best and why? And when I code what is the difference in function between them?

推荐答案

stdio.h 是C标准库中的头文件。它用于输入/输出

stdio.h is the header file in the C standard library. It is used for input/output

iostream 是C ++中的输入输出类

iostream is the input output class in C++

因此,如果您使用的是C ++,只需使用 #include< iostream>

So if you're using C++ just use #include <iostream>

这篇关于stdio.h和iostream有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆