I'm getting error from the compiler when coding C++. Here is my code:
#include <iostream>     
#include <algorithm>   
#include <typeinfo>
#include <string>
#include <vector>
std::vector< std::vector<char> > p(std::vector<char> v)
{
    std::vector< std::vector<char> > result;
    std::sort(v.begin(), v.end());
    do
    {
        result.emplace_back(v);
    }
    while(std::next_permutation(v.begin(), v.end()));
    return result;
}
and here is my error:

Any idea what is causing this?
I'm using Codeblocks 12.11, Windows 7 and my compiler is GNU GCC Compiler
Thnx for the assist :)
UPDATE:
In case somebody bumps into the same problem, here is the solution (in Codeblocks 12.11):
Go to: Settings --> Compiler --> Compiler settings --> Check the following checkboxes:

In addition to that remember to have a main-function in your code. Otherwise the compiler will give the following error:

The solution was given by the users who answered my post :)
 
    