System command and variable-CppBuzz-Forum
Hello, I am new here. I have problem with very easy(14 lines) console program. It run console and u need to enter ip address, after this it will send command to printer. i tried everything Code: #include int main() { char naslov[16]="000.000.000.000"; printf("Za vnovicni zagon vnesite IP naslov tiskalnika in pritisnite enter:\r\n"); scanf("%s", &naslov); system("curl -k -X PUT https://"%s"/ProductActions/PowerCycle -O '/tmp/pwrc' 2>&1", naslov); printf("Tiskalnik z IP naslovom: "%s", se je ponovno zagnal\r\n",naslov); return 0; } Thanks for replay!
Posted by kotjan 2021-01-06 01:30:16
No Ans Posted
Recent Links
- Random Clustering model -CppBuzz-Forum..
- C_Size-CppBuzz-Forum..
- value =-CppBuzz-Forum..
- reverse Function in C prog-CppBuzz-Forum..
- Mingw download with no installer-CppBuzz..
- Python Online Training-CppBuzz-Forum..
- function compare_to_interval-CppBuzz-For..
- rectangle.c -CppBuzz-Forum..
- Converting for loop to while loop-CppBuz..
- How to remove the (*) as we reach the en..
- more..