Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string max length in c++

Status
Not open for further replies.

home666

Programmer
Feb 23, 2004
5
IT
I'd like know string max length in linux c++ (linux release Red Hat 9)
Sorry for my english!
Thanks!!
 
Do you mean the maximum number of characters that can be allocated to a char* or the maximum size of a std::string
 
I mean the maximum size of a std::string.
Thank you for your reply.
 
Probably greater than the amount of memory you have in your machine.

--
 
Code:
size_t max_std_string_size()
{
    std::string s;
    return s.max_size();
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top