GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

Ask a Question

 

Start Coding Today

   

GeeksQuiz

GeeksforGeeksIDE

Data Structures

Algorithms

Interview Experiences

C Programming

C++ Programming

Java Programming

GATE CS

Books

new keyword and pointer

int main(){
list<int> *ms;
ms=new list<int> [1];
ms[0].push_back(1);
ms[0].push_front(2);
for(auto i:ms[0]){
	cout<<i<<" ";
}
return 0;
}

Why does the code stop abruptly when i remove the statement 

ms=new list<int> [1];

 

asked Feb 4 by anonymous
...