How do I include the string header?

后端 未结 9 1207
旧时难觅i
旧时难觅i 2020-12-05 10:01

I\'m trying to learn about strings, but different sources tell my to include different headers.

Some say to use , but other

9条回答
  •  囚心锁ツ
    2020-12-05 10:06

    For using the string header first we must have include string header file as #include and then we can include string header in the following ways in C++:

    1)

    string header = "--- Demonstrates Unformatted Input ---";
    

    2)

    string header("**** Counts words****\n"), prompt("Enter a text and terminate"
    " with a period and return:"), line( 60, '-'), text;
    

提交回复
热议问题