Thanks to all , here is the right code I used to fix this issue:
args_original = getline();
args = malloc(20 * 2 * sizeof(char*));
/* print first array */ ...
Type: Posts; User: sismail
Thanks to all , here is the right code I used to fix this issue:
args_original = getline();
args = malloc(20 * 2 * sizeof(char*));
/* print first array */ ...
you need to take it easy on your self ;-)
But thanks anyway.
thanks for the info. but hte link is broken
Thanks for your answer, I actually tried the following:
s = (getSize(args_original) * sizeof(char));
args = malloc(s);
...
Dear All,
am trying to copy on char ** object to another but getting this memeory error:
VM: Pagefault SIGSEGV bad addr no page read .. Memory fault (core dumped).
The original array is being...
Thanks a lot that was the problem. Changed Char to char and all is good.
Appreciate the help.
Here is the code .. By the way am using Minix cc compiler. Every thing was working just fine untill i added the function
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>...
Hi All, am trying to write a function that returns a pointer to a character pointer
something of the form
char ** get_command(int loc);
but I get an error at the prototype definition that * is...