I need to print a line to the screen and then get user input, but the printf("blah")
statements cause my code to not compile. The error message says 'char not expected" but when I comment the printf()
statements out, then the code compile.
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("Welcome to the shell!\n");
printf("shell:>");
char* inp = (char*)malloc(20); // error at this line
}
I am using the cc compiler in MINIX 3.1.0