问题:如何使用string/char *变量作为GetPrivateProfileInt方法的路径参数。 我试图使用GetPrivateProfileInt给出的Windows。下面的代码运行perfeclty没有任何问题: int x = GetPrivateProfileInt(L"x",L"y",1,L"This\\is\\the\\path");
但在我的情况下,路径被传递给函数。类似
values.ini看起来像 [default]
A=1
B=2
C=3
foo.txt的看起来像 Now is the %A% for %a% %B% men to come to the %C% of their %c%
我想使用PowerShell在values.ini搜索所有%X%的值,然后用相应的值,不区分大小写的情况下更换所有匹配的实例在foo.txt的;生成以下: No