C++标准API [英] C++ standard API

查看:43
本文介绍了C++标准API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名学生,刚接触 C++.我正在寻找与 Java API 一样全面的标准 C++ API.到目前为止,我一直在使用 cplusplus.comcppreference.com.

I am a student, and new to C++. I am searching for a standard C++ API that is as comprehensive as the Java API. So far I have been using cplusplus.com, and cppreference.com.

请提供任何帮助,将不胜感激.

Please any help would be greatly appreciated.

推荐答案

C++ 和 Java 有非常不同的标准库,因为它们对它们的用途做出了非常不同的假设.

C++ and Java have very different standard libraries because they make very different assumptions about what they are going to be used for.

Java 假定应用程序或小应用程序将在具有完整功能的操作系统的主机上运行,​​并以定义的方式执行大多数常规操作.

Java assumes that applications or applets will be running on a host with a full featured OS, with a defined way of doing most normal things.

有很多内容,例如在java中,输出将是一个应用程序或小程序.C++ 没有做出这样的假设,因为 C++ 可用于构建操作系统内核和内核驱动程序,它可用于在微控制器上编写全栈实时应用程序,或在超级计算机中处理块.

There's a lot of content in that, for instance, in java, the output will be an application or applet. C++ does not make that assumption, because C++ can be used for building OS Kernels and drivers for kernels, it can be used for programming full stack real time applications on microcontrollers, or processing blocks in supercomputers.

C++ 可用于实现运行它的操作系统.

C++ can be used for implementing the very operating system on which it will run.

由于这些原因,标准库几乎不假设它将提供什么,因此标准库不会对这些功能产生任何依赖.

For these reasons, the standard library assumes almost nothing about what it will have available, and so the standard library doesn't make any dependencies on those features.

唯一的例外是文件和流,因为几乎任何像堆栈这样的操作系统都有一些看起来像文件流的东西,如果它有任何类似文件的东西.

The only exception is with files and streaming, because almost any operating system like stack has something that looks like a file stream if it has anything like files at all.

如果您想要一组更丰富的特定于操作系统的 api,您需要查看一些非标准的东西.Qt 框架是一个不错的选择,它提供了许多与 Java 库中的工具类似的工具,并且是跨平台的,并且可以很好地与原生 C++ 习惯用法配合使用.

If you want a richer set of OS Specific api's you need to look at something non-standard. A great choice is the Qt framework, which provides many tools similar to what is found in the Java libraries, is cross platform, and works well with native C++ idioms.

这篇关于C++标准API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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