主页
C++
C++ 双端队列
demo_deque_access
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
using namespace std; int main() { // Create a deque called cars that will store strings deque
cars = {"Volvo", "BMW", "Ford", "Mazda"}; // Get the first element cout << cars[0] << "\n"; // Outputs Volvo // Get the second element cout << cars[1] << "\n"; // Outputs BMW return 0; }
Volvo
BMW