This is a post that I created to help the theme development. I need to have a post that’s about coding. So it first needs some sentences to describe a problem.
Then it needs some texts to elicit a block code snippets:
#include <iostream>
int main(int argc, char** argv) {
std::cout << "Hello world!" << std::endl;
}
After this short piece of code snippets, let’s try some inline code snippets:$gcc hello_world.cpp -o hello_world
Then we talk about C++ stl. Vector is very useful:
#include <vector>
int your_function() {
std::vector<int> my_vec = {1, 2, 3, 4};
my_vec[0] = 5;
for (const auto& number : my_vec) {
std::cout << number << std::endl;
}
my_vec.push_back(9);
for (const auto& number : my_vec) {
std::cout << number << std::endl;
}
}
Now compile and run again. It should print:
5
2
3
4
5
2
3
4
9
Now you have it. Enjoy C++.
Make this one even longer so that it overflows a single screen on iPad.
This is funny because iOS does not render overflown data.
I’ve never seen such things. It could be vue.




Leave a Reply