i am using
[code=cpp]
vector< pair<string,dou ble> > v;
string k = function_coded( v);
where ,
string function_coded( vector< pair<string,dou ble> > v )
{
//do something
}
[/code]
but while complilling i get the following error,please help .
error: conversion from ‘std::vector<st d::pair<std::ba sic_string<char , std::char_trait s<char>, std::allocator< char> >, double>, std::allocator< std::pair<std:: basic_string<ch ar, std::char_trait s<char>, std::allocator< char> >, double> > >’ to non-scalar type ‘std::vector<st d::basic_string <char, std::char_trait s<char>, std::allocator< char> >, std::allocator< std::basic_stri ng<char, std::char_trait s<char>, std::allocator< char> > > >’ requested
[code=cpp]
vector< pair<string,dou ble> > v;
string k = function_coded( v);
where ,
string function_coded( vector< pair<string,dou ble> > v )
{
//do something
}
[/code]
but while complilling i get the following error,please help .
error: conversion from ‘std::vector<st d::pair<std::ba sic_string<char , std::char_trait s<char>, std::allocator< char> >, double>, std::allocator< std::pair<std:: basic_string<ch ar, std::char_trait s<char>, std::allocator< char> >, double> > >’ to non-scalar type ‘std::vector<st d::basic_string <char, std::char_trait s<char>, std::allocator< char> >, std::allocator< std::basic_stri ng<char, std::char_trait s<char>, std::allocator< char> > > >’ requested
Comment