[ create a new paste ] login | about

Link: http://codepad.org/kUUoqGPQ    [ raw code | output | fork ]

C++, pasted on May 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <vector>
#include <string>
#include <algorithm>

std::string f(const std::vector<int>& input)
{
    std::sort(input.begin(), input.end());
}

int main()
{
    std::vector<int> test = [3, 5, 2, 4, 1];
    f(*test);
    cout << test;
{


Output:
1
2
3
In function 'int main()':
Line 12: error: expected primary-expression before '[' token
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: