if you do not reset your router by c++, how you reset it? by the web-formular? if yes, then take wireshark and look what packets are required for that step. you could then write c++ code that sends the data from the router's login-formular to the router to log yourself in. then you need to virtually click the required button.
you may have a look at GET/POST requests and you need to save cookies (so that you won't lose the login-session just after you created them by logging in)
in linux you would use "curl".
it really depends on your router... as example, you could install linux, ssh to it and just restart it
