mirror of git://git.qorg11.net/kill9.git
c++ rocks thing uses pandoc instead of the js thing
This commit is contained in:
parent
541a0dac1a
commit
51c5019034
|
@ -1,4 +1,3 @@
|
|||
<script src="/run_prettify.js"></script>
|
||||
<noscript><p>JavaScript disabled! Congrats! But keep in mind that there won't be syntax highligthing</p></noscript>
|
||||
|
||||
# C++ has good stuff
|
||||
|
@ -15,7 +14,7 @@ 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:
|
||||
|
||||
<pre class="prettyprint">
|
||||
~~~{.c++ .numberLines}
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
|
@ -57,7 +56,7 @@ main(void)
|
|||
|
||||
std::cout << j << std::endl;
|
||||
}
|
||||
</pre>
|
||||
~~~
|
||||
|
||||
### Async functions and stuff
|
||||
|
||||
|
@ -65,7 +64,7 @@ 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.
|
||||
|
||||
<pre class="prettyprint">
|
||||
~~~{.c++ .numberLines}
|
||||
#include <iostream>
|
||||
#include <future>
|
||||
|
||||
|
@ -83,7 +82,7 @@ main()
|
|||
std::cout << "The return value of do_stuff is: " << future.get() << std::endl;
|
||||
return 0;
|
||||
}
|
||||
</pre>
|
||||
~~~
|
||||
|
||||
## C compatibility
|
||||
|
||||
|
|
Loading…
Reference in New Issue