handle character at string(c)
i wanted to know if there is any way to read character`s from string one by one,
and set it in other string.
i have this string:
char *get = "hello";
now i want to get over the string char by char and if the letter != 'l' copy it to other string, like :
(the all problem when i tring to add the char to the copy array it tells me :
canot covert char to char *
Re: handle character at string(c)
In the above snippet *copy is a pointer to a character that you have never initialized. You will need to initialize this variable before you can use it. You will need to insure that it large enough to hold the results of your copy.
|All times are GMT +5.5. The time now is 21:50.|