Is C++ STL a C++ API? [closed] - c++

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
We have an assignment wherein we have been forbidden to use any C++ API. So, this brings me to the following questions:
What exactly is the difference between a library and an API?
Is the C++ STL (http://www.sgi.com/tech/stl/table_of_contents.html) considered a C++ API?
Next time onwards, how do I identify whether I am using a library or an API?
Thanks!
P.S: I understand my instructor can let me know whether we can use STL, but I wanted to know the difference between the libraries and the APIs irrespective of his answer; hence the question.

API (Application programming interface) is the interface of a library. To use a library, you call functions in its API. So you are not allowed to use any library.
Difference of library and API:
An API is the interface. You include a header file that belongs to library, and it has declarations of functions. Those declarations, that header file, they are the API.
A library consists of both API, and the actual implementation of those functions.

Related

How to add c++ experimental library to mac compiler? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to add experimental library to mac os x.
http://en.cppreference.com/w/cpp/experimental
how can i add this ?
There is no "experimental" library.
All of the C++ technical specifications that add to the standard library put their definitions into the std::experimental namespace. So std::experimental::future comes from the Concurrency TS. That TS effectively defines a few new functions in std::future, but it does so essentially by creating a new type in a new namespace with the old functions plus a few new ones. Should the TS be incorporated into the standard proper, those features will be added directly to std::future.
These technical specifications are effectively optional features that your standard library implementation may or may not support. If it does not support them, you may find libraries that provide the TS's functionality. For example, the FileSystem TS was based on Boost.Filesystem.
But there is no one thing you can download which will ensure that you will have all of the stuff in std::experimental.

C++ for graphical software [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm in the process of learning C++ and was wondering about the graphical implications of C++.
I know Chrome was developed in C++, but I don't see how to replicate it or create any sort of GUI.
How is Chrome programmed for the UI?
C++ doesn't include any graphical library in it. So you need to use any existing third-party library or API of operating system.
For example, there exists next graphical libraries, which supports C++:
MFC
Qt
wxWidgets
TCL/Tk
GTK+
Some of them are object oriented and some - not. Some of them are portable, some - not. Some of them are proprietary, some - not.
Also you always can use low-level API's such as Win32 API

How to output to console window without iostream in c++? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm a beginner C++ programmer.I would like to know that Is it possible to output to console windows without using iostream header file?
the answer of the question is actually Yes ! but How?
You can always delve down to the C library level, using e.g. printf.
If you don't want to use the standard library at all then you have to use platform-specific functionality. In Windows there are many layers here, much like the C++ versus C layers in the standard library. The highest Windows API layer is the WriteFile function, and below that, WriteConsole, then perhaps WriteConsoleOutput, so on, check it out.
Note that there are at least two open source projects to provide more reasonable console functionality in Windows, namely Console2 at SourceForge and mintty at Google Code.

How to get the IP address and a computer's current session's name? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is it possible in C++ to get the computer's current session's name and its IP address on which a C++ application runs ?
Will I need to use the.NET framework? If so, how ?
Thanks in advance !
Neither the C++ language and it's library provide such information today (2014).
You have to either use the API provided by the OS (certainly in C), or use a library that abstract that so that you don't have to have different code for different OS.
The .Net framework have nothing to do directly with C++ so no you are not forced to use it. It's one possibility among others. For example, Qt, Poco, RakNet, Enet and Boost( with Boost.Asio) are different libraries providing networking libraries which might provide what you are looking for.

RPC C++ Dynamic Library [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am student of M.Sc Computer Science. I have been given a project on C++ Analytics Library. I have been asked to implement some key analytics functions, design a library to implement these functions, and to make the library available via Remote Procedure Call interface.
I don't have programming background except what I learned about C++ during my course. I can do the coding for analytics function but I am stuck on RPC stuff? I could not find good resources on RPC or honestly if I say that I am not understanding from where to start on RPC? There are a lot of RPC information but could not relate to my project. I am supposed to design library for windows environment.
So far this is what I am planning to do-
I am using Visual Studio 2012 (Trial Edition)
Create IDL interface file where I am going to define all procedure or functions.
Using MIDL complier, generate client and server stub files.
and then link and compile the server and client using stub and header file.
Do you guys think that I am on right track for my project?
If yes, is there any help or best resource available for writing IDL interface file?
Any help or suggestion will be appreciated. Thanks in advance. I am not looking for the code. I am looking for the help in regards to RPC.