Hi, I'm totally new to coding. I need an advice from veteran because I doing this for my part of my task.
Is there a way to read a string generated by Command Prompt (CMD)?
My task is to create a code to ping all the network and assign IP address as active and inactive through <fstream>Input/output with files perhaps.
I wanted to copy a string from cmd for example:
Reply from 192.168.0.1: bytes=32 time<1ms TTL=64 <- (This indicate active)
Reply from 192.168.0.2: Destination host unreachable <- (This indicate inactive)
If I able to copy that line, I can write a If/Else condition to separate them. If there is any easier way to improve this scenario, please do assist me. Thank you.
The code below is to ping all IP Address until 255, but I still need 1 more function which to separate Active and Inactive IP Addresses.