Command Prompt String is definied as environmental variable PROMPT. You can modify this variable using setenv()
function from cstdlib
:
#include <stdlib.h>
//...
setenv("PROMPT", "$A$A", true);
This will, for example, set prompt string to '&&' (double ampersand). For more interesting examples check this out.
EDIT: There is a way to achieve this without need to restart command interpreter. Create following batch file:
@echo off
break off
title custom command prompt
color 0a
cls
:cmd
set /p cmd=command:
%cmd%
echo.
goto cmd
Lets name it "change_prompt.bat" Then, in your c++ code execute the batch file:
system("change_prompt.bat");
As a result, prompt will look like this:

As you can see, this changes:
- prompt window title
- prompt color
- prompt string