vector_pro::operator<<¶
Stream vector_pro and insert into std::ostream¶
Stream vector_pro and insert into std::ostream .
Please note that you must ensure your
value_typeimplements the<<stream insertion operator.
Parameters¶
output
Thestd::ostream.target
The container.
Return value¶
The reference of output itself.
Example¶
C++
// vector_pro::operator<<
#include <iostream>
#include "vector_pro.h"
/**
* Output:
* myvector contains:[ 32, 72, 55, 46, 32, 12, 61, 84, 39, 97 ]
*/
int main ()
{
vector_pro<int> myvector = { 32, 72, 55, 46, 32, 12, 61, 84, 39, 97 };
std::cout << "myvector contains:" << myvector << '\n';
return 0;
}
Complexity¶
Linear in size.