|
You are here |
sergioprado.blog | ||
| | | | |
gcher.com
|
|
| | | | | C does not have built-in support for lambda expressions, but if you are using gcc, it is actually quite easy to implement them using a simple macro. This trick relies on two C extensions: nested functions and statement expressions. Both are available in gcc (but not in clang!) Here is a small program that could benefit from lambda expressions, written in conventional C: // A function taking a function pointer as argument. | |
| | | | |
thasso.xyz
|
|
| | | | | My personal blog about things I find interesting. Hit me up! | |
| | | | |
qsantos.fr
|
|
| | | | | This article will quickly explain the Rust types [T; N], &[T; N], &[T], Vec, &Vec with C code, and what the str, &str, String, OsString and CString add. Arrays and Slices Rust C [T; N] (array)Example: [i32; 100]Allocated on the stack T[N]Example: int[100]Allocated on the stack &[T; N] (array reference)Example: &[i32; 100]N is tracked at ... Continue reading Rust Strings for C Programmers ? | |
| | | | |
baatz.io
|
|
| | | |||