H
howachen
from many books said, to use strlen(), you need to include <cstring> or
<string.h>, but i found the following program work, why?
#include <iostream>
using namespace std;
int main() {
char *c = "test";
cout<<strlen(c);
}
i know it is from <iostream>, so this mean the books are wrong now?
<string.h>, but i found the following program work, why?
#include <iostream>
using namespace std;
int main() {
char *c = "test";
cout<<strlen(c);
}
i know it is from <iostream>, so this mean the books are wrong now?