From b4802ab2ad76887bc2103c14fefe8dad36d94f1a Mon Sep 17 00:00:00 2001 From: qorg11 Date: Sun, 19 Dec 2021 13:26:43 +0100 Subject: [PATCH] whoops --- rocks/computers/software/langs/c++.md | 16 ++++++++-------- rocks/computers/software/langs/raku.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rocks/computers/software/langs/c++.md b/rocks/computers/software/langs/c++.md index 05561f3..bb4b81c 100644 --- a/rocks/computers/software/langs/c++.md +++ b/rocks/computers/software/langs/c++.md @@ -14,10 +14,10 @@ Let's be honest, no matter how much you love C, you have to recognize that the pthreads API are garbage. But C++'s threads API is much better: -~~~{.c++ .numberLines} -#include <iostream> -#include <thread> -#include <mutex> +~~~{.cpp .numberLines} +#include +#include +#include int j = 10; @@ -64,9 +64,9 @@ As far as I know, C doesn't have this (well, it does but as state above you'll have to have a lot of patience to work with pthreads). but C++ does. -~~~{.c++ .numberLines} -#include <iostream> -#include <future> +~~~{.cpp .numberLines} +#include +#include int do_stuff() @@ -77,7 +77,7 @@ do_stuff() int main() { - std::future<int> future = std::async(do_stuff); + std::future future = std::async(do_stuff); std::cout << "do_stuff() is being executed in the background" << std::endl; std::cout << "The return value of do_stuff is: " << future.get() << std::endl; return 0; diff --git a/rocks/computers/software/langs/raku.md b/rocks/computers/software/langs/raku.md index eed87d4..fb65fc5 100644 --- a/rocks/computers/software/langs/raku.md +++ b/rocks/computers/software/langs/raku.md @@ -83,7 +83,7 @@ You have to compile it so it's a shared library: `gcc -fpic -shared file.c -o libfile.so` -file.perl: +file.raku: ~~~{.perl .numberLines} use NativeCall;