C ++没有匹配函数用于call system(); [英] C++ no matching function for call system();
问题描述
#include< iostream>
#include< stdlib.h>
使用命名空间std ;
int输入;
char java;
char out;
void p()
{
cout<< 请输入档案:;
cin>> java;
cout<< \ n请输入文件:;
cin>> out;
cout<< \ n请等待......;
system(javac,java);
system(jar cvf,out,。/ *。class );
cout<< 完成;
}
int main(int argc,char * argv []){
cout<< 1.编译为.jar \\\
2.Compile到类\\\
3.Exit \ nInput:;
cin>>输入;
if(输入== 1){
p();
}否则if(input == 2){
}否则如果(输入== 3){
退出;
}否则如果(输入){
cout<< 呃;
}
}
什么我试过了:
求助!这是什么? PS它是编译java的帮助器
请参阅文档: system,_wsystem [ ^ ]。
系统
函数只接受一个参数,aC
-like string。
请参阅 system - C ++参考 [ ^ ]。
#include<iostream>
#include<stdlib.h>
using namespace std;
int input;
char java;
char out;
void p()
{
cout << "Please enter in file: ";
cin >> java;
cout << "\nPlease enter out file: ";
cin >> out;
cout << "\nPlease wait...";
system("javac ", java);
system("jar cvf ", out, "./*.class");
cout << "Done";
}
int main( int argc, char* argv[] ) {
cout << "1. Compile to .jar \n2.Compile to class \n3.Exit \nInput: ";
cin >> input;
if (input==1) {
p();
} else if (input==2) {
} else if (input==3) {
exit;
} else if (input) {
cout << "Err";
}
}
What I have tried:
Help please ! What is this? P.S its a helper for compile java
See the documentation: system, _wsystem[^].
thesystem
function takes just a single argument, aC
-like string.
See system - C++ Reference[^].
这篇关于C ++没有匹配函数用于call system();的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!