python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
can't modify buffer from pointer to pointer in C
i'm trying to fill a buffer using read function. my code look like this:
int open_read_file(char *path, char **buffer)
{
struct stat statbuf;
int fd = open(path, O_RDONLY);
int fc = 0;
if (fd < 0)...
Grainbox
Votes: 0
Answers: 1
Why is my pointer being initialized to 0x0?
I've been going through the K&R 2nd edition book and I've been stuck trying to get one of the examples to run properly.
The code taken straight from chapter 5 in the book (with some random variabl...

Hoswoo
Votes: 0
Answers: 1
Why does pthread_join crash (seg fault) at 306 Joins?
I'm playing around with creating a BUNCH of threads, just see learn a bit more about pthread. I've copied a program I found, and instead of making 1 thread, and joining it, it will create X threads, ...
ParallelNewB
Votes: 0
Answers: 2
why C++ recognizes an uninitialized raw-pointer as true?
Why the following code produces a seg-fault
//somewhere in main
...
int *pointer;
if(pointer)
cout << *pointer;
...
But slightly changed following code doesn't
//somewhe...
M. Abdul Rehman
Votes: 0
Answers: 2