constant pointer and pointer to constant
<p>There is <a href="http://dev.fyicenter.com/Interview-Questions/CPP-1/Explain_which_of_the_following_declarations_will.html" rel="nofollow">a question asking which of the following can compile and what they mean</a>. Reading between lines of the context, it seems it is saying the 1st is OK. It says 'answer whether the first declaration is pointing to a string or a single character'. This means the 1st is valid.</p>

<pre><code>* char const * 
* char * const
</code></pre>

<p>well, None of them can compile on my pc.</p>

<p>If the first  * is removed than both can compile. I dont think i have seen * at the front of any type. What am I missing?</p>

<p>--edit--</p>

<p>Since it says 'answer whether the first declaration is pointing to a string or a single character', I take it as the 1st is OK. But as well spotted below, the * at the front must be bullet points. But if that is the case, both are fine: 1st is ptr to a const string or char, the 2nd is const ptr to char.</p>

<p>--2nd edit--</p>

<p>Thank you for all your replies! I am having my post removed.</p>
