0
I’m trying to build a structure composed of members that are no more than strings. The 4th member is a string array, since it needs to store more than one piece of information.
Once done I declare I vector structures. When I will insert the data inside this The compiler accuses that a primary expression is missing before "{". Detail that when I insert the data into the vector, excluding the vector string member of the structure, the program works normally.
follows the code:
struct Estrutura{
std::string x;
std::string y;
std::string z;
std::vector <std::string> result;
};
std::vector <Estrutura> vec_estrutura;
int main(){
vec_estrutura.push_back(Estrutura{"lero", "lero", "lero", Estrutura.result.push_back("la", "li", "ho")});
return 0;
}
Thanks friend. really had the impression of being making a fundamental mistake
– Matei Romanikov