Home  >  Article  >  Backend Development  >  Is there a library or something for c++?

Is there a library or something for c++?

WBOY
WBOYOriginal
2016-09-25 09:37:011018browse

I have learned vb php js before, now I want to learn c++ and make a *.dll file for other software to use.

When I was learning, I found that processing a string is also very troublesome. For example, to split a string into an array, you need to write a function yourself. I can write it, but it is too inefficient to write everything myself.

I looked at the manual and found that there are not many functions in C++, such as those for processing arrays and strings. I couldn’t find them. My level is limited and I can’t understand English web pages..

Do you have a library?

Achieve effects of types in other languages, such as PHP’s explode, implode, str_replace, strstr?

If yes, how to import it?

Reply content:

I have learned vb php js before, now I want to learn c++ and make a *.dll file for other software to use.

When I was learning, I found that processing a string is also very troublesome. For example, to split a string into an array, you need to write a function yourself. I can write it, but it is too inefficient to write everything myself.

I looked at the manual and found that there are not many functions in C++, such as those for processing arrays and strings. I couldn’t find any. My level is limited and I can’t understand English web pages..

Do you have a library?

Achieve effects of types in other languages, such as PHP’s explode, implode, str_replace, strstr?

If yes, how to import it?

There are many libraries. C++ has its own standard library std, quasi-standard library boost, Qt, etc. There are a lot of [C++ open source libraries] searched.
Separate strings into arrays. This does not require writing a function. std::string is the string class of the standard library and can be accessed using subscripts:

<code>#include <iostream>
#include <string>

int main()
{
    std::string str = "HelloWorld";
    std::cout << str[5];
    return 0;
}
输出:W</code>

explode, implode, str_replace, strstr are all implemented in C++.
In fact, unless it is a very emerging demand, the functions required for programming can basically be found. Various wheels have been re-created countless times. Make good use of search technology, Baidu, Google, github, SourceForge Wait, you can find it in search engines and various open source code hosting websites.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn