Hello all. I am trying to determine the number of elements in a 2d character array. I am trying to print all my Linux environment variables to the screen without using the env program. This is the...
Type: Posts; User: gareth00
Hello all. I am trying to determine the number of elements in a 2d character array. I am trying to print all my Linux environment variables to the screen without using the env program. This is the...
Thanks rob, I missed that other one. I'm still getting these warning messages though. I assume it is because the formal parameters are type char **, and I am the actual parameter I am passing is...
Ok, more questions. I am getting the following warnings:
test.c: In function ‘main’:
test.c:9: warning: incompatible implicit declaration of built-in function ‘malloc’
test.c:10: warning:...
Thanks a lot, I got it! I spend all day on this stupid problem. I had to change a few things in your code so here is the working version if anyone else cares.
#include <stdio.h>
#include...
Thanks for the replies. I tried malloc() but the problem still persists. Doodle, what you are saying makes sense, I am just having trouble implementing it correctly. I know I'm still doing...
Here is my code:
#include <stdio.h>
#include <string.h>
void sayHi(char *);
int main()
{