Despite my question I DO know enough to include the headers. Integers and single characters I can put in a vector without problems. But when I try to insert a std::string the compiler (Visual c++ 2013) balks. I could use string collection, but felt originally that Vector would be the right way to go.
int main()
{
cliext::vector<std::string> VTitle;
VTitle.push_back("alcatraz");
for each(std::string elem in VTitle)
System::Console::Write("\n {0} ", elem);
return 0;
}
THe error message is "Error 42 error C2259: 'cliext::vector<std::string>' : cannot instantiate abstract class C:\CPP2013\ConsoleVector\ConsoleVector\ConsoleVector.cpp 11
"
@Aquilifer
The problem is you are trying to use a .Net container to store a non .Net type. Either use cliext::vector<System::String^> or use std::vector<std::string> and convert to System::String to use Console::Write.
Naraku,
If I understand you correctly, you are saying that vector is a .NET type, but that string isn't .NET. What can I use instead of string that would work??