I am writing a small program for my father. He needs it to cycle through a list of URLs contained in a text file every 15 seconds. I have it opening the URLs but I cant figure out how to either redirect the current tab or close and open a new one.
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
#include <string>
#include <fstream>
#include <iostream>
#include <windows.h>
std::ifstream infile("links.txt");
int main(){
std::string link;
while(std::getline(infile, link)){
system(std::string("start " + link).c_str());
Sleep(15000);
}
}
I am fairly inexperienced with C++ and out of practice. Any and all help is greatly appreciated.