Hi,

I am trying to find the size of the buffer for an uninitialized string and an empty string, but using size() and length() doesn't seem to be helping me.

Here is the program I am using to try and find the size of the buffers being used for the strings:

Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s1;  //unitialized string using size()
	cout << s1.size() << endl;

	string s2 = ("");  //empty string using size()
	cout << s2.size() << endl;

	string s3;  //unitialized string using length()
	cout << s3.length() << endl;

	string s4 = ("");  //empty string using length()
	cout << s4.length() << endl;

	system ("PAUSE");
	return 0;
}
Which is giving the following output:

0
0
0
0
sh: PAUSE: not found
Press Enter to continue!
Could anyone tell me how I can find the size of the buffers being used?

I'm unsure if I'm missing the point somewhat.

Many thanks!