The command does not work

if (i==1) tPipe=_popen("logman create counter ch -c ""\\Процесс(ch)\\""Рабочее множество"""" -f tsv", "rt"); 

gives the error "Invalid path to set counters".

  • And then the case is not an extra closing quote after the path? And why is it in Russian letters? How will it work on an English speaking machine? - cy6erGn0m
  • I do not understand what bracket as I understand it with ++ I don’t like the space in the working set - ivanpetr
  • help out guys you must pass the command line - ivanpetr
  • Strings on the command line containing spaces must be enclosed in quotes. Windows NT console commands - Ildar

1 answer 1

It looks like the string is not correctly described. Here are some specials. characters:

 \n - новая строка \r - возврат каретки \" - двойная кавычка \\ - косая черта (обратная) 

For example, the string

 "файл "c:\temp\1.txt" не найден" 

described by:

 "файл \"c:\\temp\\1.txt\" не найден"