📜  如何在 C++ 代码示例中打印列表

📅  最后修改于: 2022-03-11 14:44:53.333000             🧑  作者: Mango

代码示例1
#include 
#include 

std::list listOfNumbers = {1, 2, 3, 4};

for (int item : listOfNumbers)
  std::cout << item << " ";