referring to http://www.math.ntnu.no/~hrue/GMRFsi...ple-approx-2.c
i fount the main() to be as
Can someone explain me, where is env used and for what purpose?Code:int main(int argc, char **argv, char **env)
referring to http://www.math.ntnu.no/~hrue/GMRFsi...ple-approx-2.c
i fount the main() to be as
Can someone explain me, where is env used and for what purpose?Code:int main(int argc, char **argv, char **env)
in certain borland compilers and maybe others, it's used to pass environment variables to the program. It's non-standard though. See the faq.
See the faq.[/QUOTE]
from the FAQ :-
Code:int main(int argc, char *argv[], char *envp[])
shouldnt it be char *env[] than char *envp[] ??
as long as the types are the same, it doesn't really matter.
would work too, it's just convention.int main(int sdgf, char *dslkgjf[])
Last edited by robwhit; 06-17-2007 at 03:32 PM.
See MSDN too, they provide a pretty good explanation: http://msdn2.microsoft.com/en-us/lib...sc(VS.71).aspx