#include#include int main() { QVector vector; vector.append("apple"); vector.append("banana"); vector.prepend("orange"); qDebug() << vector; return 0; }
("orange", "apple", "banana")
#include#include int main() { QVector vector = {1, 2, 3, 4, 5}; vector.prepend(0); qDebug() << vector; return 0; }
(0, 1, 2, 3, 4, 5)Both of these examples use the Qt library, specifically the QVector class.