Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C++ adds multiple plastic data to the list. Enter the code of how to write data from the keyboard and use the letters in the standard function template library.
C++ adds multiple plastic data to the list. Enter the code of how to write data from the keyboard and use the letters in the standard function template library.
Very simple

STD::list & lt; Int> test;

int a = 1;

while ( 1)

{

STD::cout & lt; & lt "Please enter a number and press 0 to exit 0" < < STD::endl;

STD::CIN & gt; & gta;

If (a == 0)

Break;

test . push _ back(a);

}

STD::list & lt; Int>* iterator it = test.begin ();

And (it! = test.end())

{

STD::cout & lt; & lt* it++ & lt; & ltSTD::endl;

}