User Input in italics

Hello!

I am a beginner in C++.The program I want to create is as follows.
The program will take a sentence as input from the user in italics and display it.

The output will be:
Enter a sentence :
Hello World!
You have entered : Hello World!

I am not getting an idea how to take user input in italics.

Thanks in advance.
You can't do it in the your terminal / console. Maybe you could do it using a gui, and a good font api.
How can I program it in C++?

int main()
{
string h;
cout << "Enter a sentence";
getline(cin, h);
cout << "You have entered" + h ;
return 0;
}

This is not taking user input in italics.
There are no "italic" letters in character encodings. You gotta use gui.
I don't think the problem is to make user input italic. I think the problem wants to use italic text to disguise user input and program output.
liuyang

Exactly so. How can I resolve this?
You code should work. What else to resolve?
Topic archived. No new replies allowed.