我需要将打印机设置为“Microsoft Print to PDF”,但我如何知道它将位于哪个端口?在另一台机器上可能会有所不同。我需要它能够在不知道端口“on XXXX:”部分的情况下进行设置,如下所示:
Application.activeprinter = "Microsoft Print to PDF"
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激。谢谢
?ActivePrinter 'show active printer "XXXXXX on XXXX:"
Run Code Online (Sandbox Code Playgroud) 我有一组包含城市,国家,纬度和纬度的数组.c ++语言.
ifstream file("worldcities.csv");
getline(file, temporay);
//inputs the file into 4 arrays for each catergories
for (i=0;getline(file,(cities[i]),',');i++)
{
getline(file, countries[i], ',');
getline(file, latitude[i], ',') ;
getline(file, longitude[i]);
}
Run Code Online (Sandbox Code Playgroud)
我如何同时对纬度和经度阵列进行排序,以找到列表中所有其他列表的前五个最低或最高,但同时不会丢失那些长期与之相关的城市和国家的元素?