The destruction of the line can be achieved with Dan's recommendation:
string var = "hey\ns";
Note that you cannot do this the way you want:
string var = "hey // this is not s";
and this is the design choice for C ++.
Older languages ββusually do not allow multiline strings to be defined.
But, for example, Python allows you to do just that:
someString = """ this is a multiline string """
and printing someString will give you a true multi-line string.
However, you can forget about this when using C ++.
source share