#include<iostream>
int main()
{
std::cout<<R"( ********
************
####....#.
#..###.....##....
###.......###### ### ###
........... #...# #...#
##*####### #.#.# #.#.#
####*******###### #.#.# #.#.#
...#***.****.*###.... #...# #...#
....**********##..... ### ###
....**** *****....
#### ####
###### ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
########################################## #----------#
#.....#......##.....#......##.....#......# #----------#
########################################## #----------#
#.#..#....#..##.#..#....#..##.#..#....#..# #----------#
########################################## ############ )";
}
c++11支持多文本输出,如上所示,但是,我刚开始用dev编译时,出现错误:
4 5 D:\D3 U\算法\1112\多行输出.cpp [Error] missing terminating " character
用如下代码查看我的编译器版本
#include <iostream>
using namespace std;
int main()
{
cout << __cplusplus << endl; // 比如我的 C++ 版本是 199711,对比下面的参数是 C++98
}
运行结果如图,这表明我是c++98
对应参数:
C++ pre-C++98: __cplusplus is 1.
C++98: __cplusplus is 199711L.
C++98 + TR1: This reads as C++98 and there is no way to check that I know of.
C++11: __cplusplus is 201103L.
C++14: __cplusplus is 201402L.
C++17: __cplusplus is 201703L.C++20: __cplusplus is 202002L.
而我开始的那个多行输出需要在c++11之后才能运行 。
在出来的编译器选项里做如下更改,然后点击确定。
再次编译运行就能成功了。