We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9590757 commit 2fc3516Copy full SHA for 2fc3516
samples/chello/chello.c
@@ -15,11 +15,11 @@ const NeotronApi *g_api;
15
int app_entry(const NeotronApi *f, size_t argc, const FfiString* argv) {
16
g_api = f;
17
// allocate a buffer
18
- void *buffer = calloc(1024, 1);
+ char *buffer = (char*) calloc(1024, 1);
19
// write a string into it
20
- snprintf(buffer, 1023, "Hello, world!\n");
+ snprintf(buffer, 1023, "Hello, world!");
21
// print the buffer
22
- printf(buffer);
+ printf("Buffer %p contains: '%s'\n", buffer, buffer);
23
// free the buffer
24
free(buffer);
25
for(size_t i = 0; i < argc; i++) {
0 commit comments