Code:
/*
Question came up: "How big is a string character?"
sizeof returns 8 bytes in all cases except for
sizeof( str3[1] ) which returns 1
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
int istr = sizeof(str);
cout << "Empty string
Leave a comment: