mirror of
https://git.tesses.org/tesses50/tessesframework.git
synced 2026-06-01 18:15:31 +00:00
Overhaul cmake configuration, add console api, fix http code that caused issues with cgi-bin
This commit is contained in:
31
examples/console-list.cpp
Normal file
31
examples/console-list.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "TessesFramework/TessesFramework.hpp"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
using namespace Tesses::Framework;
|
||||
using namespace Tesses::Framework::TextStreams;
|
||||
TF_Init();
|
||||
|
||||
std::vector<std::string> myList = {
|
||||
"Demi Lovato",
|
||||
"The Gremlins",
|
||||
"Al Gore",
|
||||
"Steve Ballmer",
|
||||
"CrossLang",
|
||||
"Tom Scott",
|
||||
"Louis Rossmann",
|
||||
"Mike Nolan",
|
||||
"Tim Cook"
|
||||
};
|
||||
|
||||
auto res = Console::List(myList);
|
||||
|
||||
if(res > myList.size())
|
||||
{
|
||||
Console::WriteLine("You must select one");
|
||||
}
|
||||
else {
|
||||
StdOut() << "You selected " << myList[res] << "." << NewLine();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user