I have some kinda problem each time i create a vector of strings. There is no error if I create vectors of other data types such as int, double, etc. Though there's no error...but there's warnings...and sometimes the program hangs if i do sortings. Here's an (without sorting but still getting warnings) example:
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> values(5);
values.push_back("dog");
values.push_back("cat");
values.push_back("bag");
values.push_back("box");
values.push_back("boy");
for(int i = 0; i < values.size(); i++ )
{
cout << values[i] << " ";
}
return 0;
}
This is the message in the build tab:
Compiling...
testSortString.cpp
C:\Documents and Settings\Jason\Desktop\testSortString\testSortString.cpp(24) : warning C4786: 'std::reverse_iterator,std::allocator > const *,std::basic_string,std::all
ocator >,std::basic_string,std::allocator > const &,std::basic_string,std::allocator > const *,int>' : identifier was truncated to '255' characters in the debug information
C:\Documents and Settings\Jason\Desktop\testSortString\testSortString.cpp(24) : warning C4786: 'std::reverse_iterator,std::allocator > *,std::basic_string,std::allocator
>,std::basic_string,std::allocator > &,std::basic_string,std::allocator > *,int>' : identifier was truncated to '255' characters in the debug information
i:\microsoft visual studio\vc98\include\vector(47) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information
i:\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::~vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information
Linking...
testSortString.exe - 0 error(s), 4 warning(s)
Hope you guys enlighten me....thanks in advance....