c ++标准api [英] c++ standard api

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

问题描述

我是一个学生,是新的到c ++。我正在寻找一个标准的c ++ api,与java api一样全面。我一直在使用cplusplus.com和cppreference.com。非常感谢任何帮助。

解决方案

C ++和Java有非常不同的标准库,因为他们做了非常不同的假设,将被用于。



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



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



C ++可以用于实现它将运行的操作系统。



由于这些原因,标准库几乎什么也不假定什么将具有可用性,因此标准库不对这些功能产生任何依赖性。



唯一的例外是文件和流,因为几乎任何类似堆栈的操作系统都有一个文件流,如果它有什么像文件。 p>

如果你想要一个更丰富的操作系统特定api集,你需要看看非标准的东西。一个伟大的选择是Qt框架,它提供了许多类似于Java库中的工具,是跨平台的,并与原生C ++成语很好。


I am a student, and new to c++. I am searching for a standard c++ api that is as comprehensive as the java api. I have been using cplusplus.com, and cppreference.com. Please any help would be greatly appreciated.

解决方案

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

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.

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++ 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.

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天全站免登陆