arg_test program
+ comment libncurses-dev install
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/10/03 19:14:46 by lperrey #+# #+# */
|
/* Created: 2021/10/03 19:14:46 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/10/10 03:37:29 by lperrey ### ########.fr */
|
/* Updated: 2021/10/13 16:09:32 by lperrey ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# include <termios.h>
|
# include <termios.h>
|
||||||
# include <curses.h>
|
# include <curses.h> // sudo apt install libncurses-dev (OR libncurses5-dev)
|
||||||
# include <term.h>
|
# include <term.h>
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
|||||||
16
tests/arg_test.c
Normal file
16
tests/arg_test.c
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
# include <stdio.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[], char *envp[])
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
printf("argc = %i\n", argc);
|
||||||
|
i = 0;
|
||||||
|
while (argv[i])
|
||||||
|
{
|
||||||
|
printf("argv[%i] = |%s|\n", i, argv[i]);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user