I'm trying to do this (for a university homework) because i have a Linux shared memory in which i have to write some data, and i can access it by a void* . I was trying to write an integer followed...
Type: Posts; User: steli89
I'm trying to do this (for a university homework) because i have a Linux shared memory in which i have to write some data, and i can access it by a void* . I was trying to write an integer followed...
Well.. the next memory location. Doesn't this work the same way for void* like for any other pointer type? I'm trying to write 0 then "cucu" into that memory area.
I'm trying to create a block of memory with an int followed by a sequence of characters. The following code prints 0 and then, after the memcpy, 1668637440. The integer is modified. What am i doing...
Thank you! fflush seems to be the solution
I'm a newbie to processes in general and i have this code:
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>