PDA

Click to See Complete Forum and Search --> : String headers


Wynd
Jun 17th, 2001, 08:29 PM
Is there a difference between <string> and <cstring>?

denniswrenn
Jun 18th, 2001, 10:22 AM
<string> contains the string class, <cstring> contains the char* manipulation functions(strlen, etc...).



#include <string>
using namespace std;
int main()
{
string test = "a string";
return(0);
}


#include <cstring>
using namespace std;
int main()
{
char* test = "a string";
int l = strlen(test); //gets the length of character pointer test.
return(0);
}