samedi 28 février 2015

C++ Launching programs with system() not giving desired results

I have a C++ code setup that launches items for me, all i have to do is input the name and it launches. The Problem is that when I have the C++ Application launch it the C++ Application "turns into it" By that i mean pretend i'm using it launch a minecraft server. It will act as if the minecraft server was were it was and its make files it needs there Not using the ones in its directory. If anyone can help please do.


(Heres the code)



#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;

int main() {
std::string textin;
cin >> textin;
if ( textin == "ATLauncher" ) {
system("C:\\users\\USER\\Main\\minecraftserver\\minecraftserver.exe");
return 0;
}
}

Aucun commentaire:

Enregistrer un commentaire