Code:char *p;
int fd;
int count;
fd = open (filename, O_RDONLY, 0777);
count = read(fd,p,100);
printf("%d",count);
Printable View
Code:char *p;
int fd;
int count;
fd = open (filename, O_RDONLY, 0777);
count = read(fd,p,100);
printf("%d",count);
and this is C not C++
http://cpwiki.sf.net/A_pointer_on_pointers
Uninitialized pointers are very bad. I suggest you read the article to get some insight on pointers.