Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
Hostgator 1 Penny

BlueHost Web Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

getflywheel wordpress hosting


Distribute your Resume to 500+ Job Boards & Recruiters


7,770 questions

10,853 answers

573 users

How to add a string to start of deque in C++

1 Answer

0 votes
#include <iostream>  
#include <string>  
#include <deque> 

int main()
{
	std::deque<std::string> dq;

	dq.assign(5, std::string("c++"));

	dq.push_front("java");

	for (auto elem : dq) {
		std::cout << elem << ' ';
	}
	std::cout << std::endl;

	return 0;
}

/*
run:

java c++ c++ c++ c++ c++

*/

 




answered Jan 4 by avibootz
...