missing type specifier - int assumed. Note: C++ does not support default-int
<p>I have a cpp file that contains the following:</p>

<pre><code>char const* types[] = { "char", "short", "int", "long", "float", "double", "void"};
std::set&lt;std::string&gt; ReservedWords;
ReservedWords.insert(std::begin(types),std::end(types));
</code></pre>

<p>this gives an error <code>missing type specifier - int assumed. Note: C++ does not support default-int</code></p>

<p>I have read that you can't write statements in a global scope, is this the case here ?</p>

<p>I don't completely understand the rule, and would like to know where its best to put this code ? (header file, inside a function etc...)</p>

<p>Thanks</p>
