初始化提交

This commit is contained in:
王立帮
2024-07-20 22:09:06 +08:00
commit c247dd07a6
6876 changed files with 2743096 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
/*
Simple List
This program shows basic usage of QList
Created 30th November 2016
By SloCompTech
https://github.com/SloCompTech/QList
*/
#include "QList.h"
QList<String> myList;
void setup()
{
Serial.begin(115200);
myList.push_back("First"); // Add item at the back of the line
myList.push_back("Second");
myList.push_front("New first"); // Ad item at the front of the line
myList.at(1) = "NewSecond"; // Changed value of item in the list
myList[0] = "NewNewFirst"; // Changed value of item in the list
Serial.println("Items:");
// Go through items
for(int i=0;i<myList.size();i++)
{
Serial.println(myList.at(i));
}
myList.pop_back(); // Remove item at the back of the line
Serial.println("Items:");
for(int i=0;i<myList.size();i++)
{
Serial.println(myList.at(i));
}
myList.clear(); // Clear all items in table
}
void loop()
{
}