Why not? Just change the parameter type to char* and return type to int, and you're all good - no ambiguity. Besides, the library functions are supposed to be in the std:: namespace.because you aren't allowed to create user defined functions with those names.
Output:Code:#include <iostream> #include <string> #include <cstring> #include <cstdlib> int strlen(char* x) { return 200; } int main() { char* y = "1234"; for(int i = 0; i < strlen(y); ++i) std::cout << y[i]; std::cin.get(); return 0; }1234 4³I úÚB l³I OåB @´I þÑB T €´I ÖÖB ð´I ’ãB ÍÚB [èB ÆÒB àB IÒB ØB ÓB ‹ÑB dßB oèB 3ÞB {æB $µI láB ©àB ˜ÝB ÆÒB jèB èB ØB ÓB ¼æB íÓB ûèB ÞçB åB