1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream> using namespace std; int getLength(char * str); int main(){ cout<<getLength("test")<<endl; return 0; } int getLength(char * str){ return strlen(str); }
1 2 3
cc1plus: warnings being treated as errors In function 'int main()': Line 7: warning: deprecated conversion from string constant to 'char*''