Add a bit more C++ stuff to the C++ app

This commit is contained in:
apio 2022-11-12 13:12:51 +01:00
parent de2451e553
commit 16e6fba2d0

View File

@ -1,6 +1,19 @@
#include <cstdio>
#include <string>
#include <vector>
int main()
{
printf("Well hello world!\n");
std::printf("Well hello world!\n");
std::string str = "this is a c++ string";
str.append(" yay");
std::printf("%s\n", str.c_str());
std::vector<int> vec = {3, 2, 8};
for (int i : vec) { std::printf("%d ", i); }
std::putchar('\n');
}