hi all,,,,
can anyone tell me what is a segmentation fault????? when i try to run this piece of code,,,,it compiles ofcourse but then when i try to run it it goes segmentation fault (core dumped) and then exists,,,any ideas,,,here is the code:
int main() {
vector<string> v;
char* line;
while ( cin.getline(line, '\n'))
v.push_back(line); // Add the line to the end
// Add line numbers:
for(int i = 0; i < v.size(); i++)
cout << i << ": " << v[i] << endl;
return 0;
} ///:~

would appreciate it if someone could answer me soon,,,thanx!