C++ to C: Strings...


Read With Formatting | Free Open Source Tutorials Account

C and C++ Programming
Thread: C++ to C: Strings...


bconnor
string s = "we";
string s2 = "I";
s.replace( 0, s2.length(), s2 );
cout << s << endl;


There isnt a simple way to do something like this in C, is there?

md_doc
Strings in C are made up of character array's so the answer is no... no easy way to manipulate strings in the C like there is in C++