Hello,
I was writing a code with strlen and strcpy functions, and I realized that I forgot to include <cstring> header file. But the program run without any problem. My program included <iostream> header file and I am wondering if <iostream> contains <cstring> header file.
I tried the following code:
When I omit first line, the compiler gives an error saying strcpy is not a member of std, but when I include the first line, it runs fine.Code://#include <iostream> int main() { char arr[5]; std::strcpy(arr, "Hey"); return 0; }
Thanks.



LinkBack URL
About LinkBacks


