I
I
Ilya1992018-07-04 18:39:08
C++ / C#
Ilya199, 2018-07-04 18:39:08

How to make a space after a letter (in my case after a comma) when it is in an array?

For practice, I wrote a small program, everything works, but as soon as I put a space after the comma, the compiler immediately swears, I remove it - everything is fine, it compiles
Code:

char arr[12] = {'H', 'e', 'l', 'l', 'o', ', ', 'w', 'o', 'r', 'l', 'd', '!'};

There is a comma after the letter o, after which there is a space, if anything
Yes, it may be easier to just remove this space, but still, is it possible to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-07-04
@Ilya199

So who will change the size of the array?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question