<p>Been thinking, what's the difference between declaring a variable with [] or * ? The way I see it:</p>

<pre><code>char *str = new char[100];
char str2[] = "Hi world!";
</code></pre>

<p>.. should be the main difference, though Im unsure if you can do something like</p>

<pre><code>char *str = "Hi all";
</code></pre>

<p>.. since the pointer should the reference to a static member, which I don't know if it can?</p>

<p>Anyways, what's really bugging me is knowing the difference between:</p>

<pre><code>void upperCaseString(char *_str) {};
void upperCaseString(char _str[]) {};
</code></pre>

<p>So, would be much appreciated if anyone could tell me the difference? I have a hunch that both might be compiled down the same, except in some special cases?</p>

<p>Ty</p>

The first option dynamically allocates 100 bytes.
The second option statically allocates 10 bytes (9 for the string + nul character).
Your third example shouldn't work - you're trying to statically-fill a dynamic item.
As to the
```
upperCaseString()
```
question, once the C-string has been allocated and defined, you can iterate through it either by array indexing or by pointer notation, because an array is really just a convenient way to wrap pointer arithmetic in C.
(That's the simple answer - I expect someone else will have the authoritative, complicated answer out of the spec :))