ok i have a problom... my program quits even tho im sure that its fine... no iv been mucking around with it(crappy code) here it is
Code:
#include "stdafx.h"
void command (int pram)
{
char cmd[256];
printf("Evil Command Center->");
scanf("%s",cmd);
proc(cmd);
}
void proc(char cmd[256])
{
int fn; //function so the switch will work
if (!strcmp(cmd, "help"))
{
fn = 1;
} else if (!strcmp(cmd, "exit"))// to cheack out if its time to quit
{
fn = 2;
}
switch(fn)
{
case 1: //help system
{
system("help");
}break;
case 2:
{
Fquit();
}break;
default:
{
printf("unknown command\n");
}break;
command(0);
}
}
void Fquit()
{
system("exit");
}