I am copying one array into another using pointers, and one value in the

array I have to fill in "by hand" if a certain condition happens.

Please, help me to understand what shall I do to assign the value " ",

meaning white space, to the place where the pointer points to:

*--ptr = " " produces a

warning message: assignment makes integer from pointer

 without a cast

Why? *--ptr means "go back one step", and then put the value

of " " there. Yes, " " is an integer, but I am not assigning it

to a pointer but putting it to the place where the pointer points to.

Thank you!


I got it! Embarrassing ) I have declared ptr as a pointer to char, not int.

I have not yet tested this assumption, but I believe this is the problem )

Sorry for posting inappropriate question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .