std :: string一个容器 [英] std::string a container

查看:125
本文介绍了std :: string一个容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

is std :: string是标准c ++库中的容器类,限制只保存char元素?

Is std::string a container class in standard c++ library, restricted to hold only char elements?

推荐答案

实际上, std :: basic_string< char> 的typedef。 std :: basic_string 是专为字符串操作设计的容器类。此容器可用于宽字符( wchar_t );对于这种情况,其typedef将 wstring

It's a typedef of std::basic_string<char>, actually. std::basic_string is a container class specifically designed for string operations. This container can be used for wide characters (wchar_t) as well; for that case its typedef would be wstring.

这篇关于std :: string一个容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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