He guys, just took a look at my little codefragment
text[5]=' '; text[6]='k'; text[7]='g';
How to put this in one single line? for example
//This does'nt works! text[5 to 7]=" kg";
Sorry for this stupid question, i guess there is a solution, but i was interrested in another idea than mine :-)
"What is better, this or strcpy? Where are differences?"
What are your requirements regarding the NUL-terminator?
strcpy() copies its second argument including the argument string's NUL-terminator.
If that's not what you want, then use strncpy() with the third argument chosen to avoid copying the NUL-terminator or assign characters to individual string (array) elements.