B
bashcommando
Guest
I was writing code and came across an error:
The error with the code is in this section:
Code:
boot.c:34:12: error: expected string literal before ‘cmd’
Code:
while (1)
{
printf("starfruit>");
while (test)
{
get = getchar();
if ( get == "\\" ) {
printf("\n");
test = 0;
count = 1;
} else {
count = count + 1;
cmd[count] = get;
}
}
if ( cmd == "halt" ) {
__asm__("cli");
__asm__("hlt");
} else {
__asm__(cmd);
}
}