<p>This very simple code gives me tons of errors:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;

int main() {
    std::string test = " ";
    std::cout &lt;&lt; test;
}
</code></pre>

<p>I tried to compile it on linux by typing <strong>gcc -o simpletest simpletest.cpp</strong> on the console. I can't see why it isn't working. What is happening?</p>

You declared your
```
main()
```
as returning an
```
int
```
yet you have no return statement.  Add
```
return 0;
```
and see if that helps.  If that doesn't solve your problem, try editing your post to include some representative lines from those errors your getting and maybe we can help you better.