usually i just use the 'system("ping 8.8.8.8"); command, but im trying to store information in a variable (IP) and then ping that ip using system in a c++ program. this seems very easy, but when i tried, i wrote the code below. It should work, but it tells me there are too many arguments in function call. Can anybody please help me with a solution to this?
ImGui::PushItemWidth(100); static char IP[64] = ""; ImGui::InputText("PING IP", IP, 64); ImGui::PopItemWidth(); if (ImGui::Button("ping test")) { system("ping ", IP); }
https://stackoverflow.com/questions/67030655/how-to-ping-a-certain-ip-in-a-c-program April 10, 2021 at 11:58AM
没有评论:
发表评论