Given the following code
Thanks in advance
listener.support(methods::GET, [](http_request request) {
string_t path;
string_t host;
int port;
std::vector<utility::string_t> splitPath;
try {
path = request.relative_uri().path();
host = request.relative_uri().host();
port = request.relative_uri().port();
splitPath = request.relative_uri().split_path(path);
std::cout << splitPath.at[1] << std::endl;
request.reply(http::status_codes::OK, U("Request Recieved!!!"));
}
catch (std::exception& e) {
// TODO: log this
std::cout << e.what() << std::endl;
}
});
I am trying to get each entry in the path but the above code does not compile - the following line fails witherror C3867: 'std::vector<utility::string_t,std::allocator<_Ty>>::at': function call missing argument list; use '&std::vector<utility::string_t,std::allocator<_Ty>>::at' to create a pointer to member c:\users\paul\documents\visual studio 2013\projects\dataengine\dataengine\messagelistener.cpp 34 1 DataEngine
and Error 2 error C2109: subscript requires array or pointer type c:\users\paul\documents\visual studio 2013\projects\dataengine\dataengine\messagelistener.cpp 34 1 DataEngine
I'm trying to learn C++ at the same time can anyone help?Thanks in advance