ac_request("dialog_get_filename",string Title, string Filter, string &FileNameAndPath);

 Calls a dialog to select an existing file or specify a new file name.

Title - specifies the title of the dialog
Filter - filter for name and file extension (for example, if you specify "* .txt" - then the user will be able to select only the file with the extension txt)
FileNameAndPath is the name and path of the file. When accessing the function, it sets the initial value of the file name and path. When the dialog is closed, the selected file and the path to it are returned to this variable.

The return value.

With an affirmative file selection, the function returns 0. In all other cases -1.

string FileNameAndPath;

int ires = ac_request("dialog_get_filename", "Specify the file name to save report", "*.txt", FileNameAndPath);
if(ires == 0)
   cout << "File selected="<<
   cout << "No file selected";