#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char *name;
char *name2;
name = new char[5];
name = "asdf";
cout << strlen(name) << endl;
return 0;
}
- c++ compile하려면 g++
- string library는 #include <cstring>