I can t to send argument to file.exe,
In C++ is :
#include <iostream>
using namespace std;
int pierwsza(int n);
int main() {
int n;
cout<<"Podaj ktora liczbe pierwsza mam wyswielic: ";
cin>>n;
cout<<"Jest to liczba: "<<pierwsza(n)<<endl;
system("pause");
return 0;
}
int pierwsza(int n) {
int j=1;
int wynik=2;
for (int i=2;j<n;i++) {
for (int k=2;k<i;k++) {
if (i%k == 0) {
break;
}
if (k == i-1) {
j++;
}
}
wynik=i;
}
return wynik;
}
compiled file C++FirstProject.exe
How to call to exe file with arg ?
julia> run(Cmd(`C++FirstProject.exe`))
Podaj ktora liczbe pierwsza mam wyswielic:
3
Jest to liczba: 5
Aby kontynuować, naciśnij dowolny klawisz . . .
Is OK!
But if a call run ONLY with arg not works. 
julia> cmd = Cmd(`C++FirstProject.exe`)
`C++FirstProject.exe`
julia> p = run(cmd, 3, wait=false)
ERROR: MethodError: no method matching spawn_opts_swallow(::Int64)
Closest candidates are:
spawn_opts_swallow() at process.jl:542
spawn_opts_swallow(::Tuple{Union{RawFD, WindowsRawSocket, FileRedirect, IO},Union{RawFD, WindowsRawSocket, Fil
eRedirect, IO},Union{RawFD, WindowsRawSocket, FileRedirect, IO}}) at process.jl:541
spawn_opts_swallow(::Union{RawFD, WindowsRawSocket, FileRedirect, IO}) at process.jl:542
...
Stacktrace:
[1] #run#509(::Bool, ::Function, ::Cmd, ::Int64, ::Vararg{Int64,N} where N) at .\process.jl:672
[2] (::getfield(Base, Symbol("#kw##run")))(::NamedTuple{(:wait,),Tuple{Bool}}, ::typeof(run), ::Cmd, ::Int64, :
How to call to exe file with arg =3 and get just 5 ?
Paul