Alright, so I'm trying to re create Command Prompt and it's sort of working, but it doesn't parse argument's properly. The code and output is below.
Code:
Output:
Color 0a
'0a' is not recognized as an internal or external command,
operable program or batch file.
Can anyone help me out here?
p.s: I'm using a Win32 Console App
Code:
Code:
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
while(1){
string var = "";
cin >> var;
if(var == "exit"){
break;
};
int ret = system(var.c_str());
if(ret == 0){
} else {
};
};
}
Color 0a
'0a' is not recognized as an internal or external command,
operable program or batch file.
Can anyone help me out here?
p.s: I'm using a Win32 Console App
Comment