C++ strlen()

1 개요[ | ]

C++ strlen()

2 C 스타일[ | ]

#include <iostream>
#include <cstring>
using namespace std;
int main() {
	cout << strlen("abc") << endl; // 3
}
#include <stdio.h>
#include <string.h>
int main() {
    printf("%d", strlen("abc")); // 3
}

3 C++ 스타일[ | ]

#include <iostream>
#include <string>
using namespace std;
int main() {
    string s = "abc";
    cout << s.length() << endl; // 3
}

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}