I am trying to use the functions suggested here to split a string by a deliminator, but I am getting a handful of errors whenever I try to use vector<string> as a return type.
I made a simple function that returns a vector<string> as a test, but am still getting the same errors:
// Test.h
#pragma once
#include <vector>
#include <string>
using namespace std;
using namespace System;
namespace Test
{
vector<string> TestFunction(string one, string two);
}
.
//Test.cpp
#include "stdafx.h"
#include "Test.h"
namespace Test
{
vector<string> TestFunction(string one, string two) {
vector<string> thing(one, two);
return thing;
}
}
And a screenshot of the errors:

Does anyone know why I seem to be unable to use vector<string> as a return type?
This is not a valid
vector<string>constructor:Change to (for example):
Also consider changing parameters to be
const std::string&to avoid unnecessary copy.