Error using wget in c++ -


I have downloaded wget from gnuwin32 and I try to run commands in C ++ program using the system () function I am here. I have Visual Studio because I am using the Windows OS 2012 my compiler runs on wget command line, but when I put it in the system function is my error " 'wget' internal or external command, operative program or batch file Has not been identified in the form "

Here is my code:

  #include & lt; Cstdlib & gt; # Include & lt; Iostream & gt; #include & lt; String & gt; using namespace std; int main () {string str = string ("wget ​​-O test.csv \" http: // ") +" somewebsitelink \ ""; Const char * x = str.c_str (); Cout & lt; & Lt; Str & lt; & Lt; Endl; System (x); System ("pause"); Return 0; } In fact, the visual studio is probably overwriting your normal path.  

Simply put the complete path manually:

The system ("c: / path / wget ...");

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -