cheche42 @ 2022-12-20 22:03:05
#include<iostream>
using namespace std;
int main(){
cout<<
" ********\n"
" ************\n"
" ####....#.\n"
" #..###.....##....\n"
" ###.......###### ### ###\n"
" ........... #...# #...#\n"
" ##*####### #.#.# #.#.#\n"
" ####*******###### #.#.# #.#.#\n"
" ...#***.****.*###.... #...# #...#\n"
" ....**********##..... ### ###\n"
" ....**** *****....\n"
" #### ####\n"
" ###### ######\n"
" ##############################################################\n"
" #...#......#.##...#......#.##...#......#.##------------------#\n"
" ###########################################------------------#\n"
" #..#....#....##..#....#....##..#....#....#####################\n"
" ########################################## #----------#\n"
" #.....#......##.....#......##.....#......# #----------#\n"
" ########################################## #----------#\n"
" #.#..#....#..##.#..#....#..##.#..#....#..# #----------#\n"
" ########################################## ############\n";
}
by CaIyUcAiYu @ 2022-12-20 22:26:06
一个字符串前面要有一个“<<”
by cheche42 @ 2022-12-20 22:26:47
@CaIyUcAiYu
是可以的,修改后已通过
by cheche42 @ 2022-12-20 22:31:25
@jomy2013
已修改,非常感谢大佬
by ud2_ @ 2022-12-20 23:37:44
@CaIyUcAiYu
怎么一个“<<”后面有那么多字符串
预处理之后、编译之前,相邻的字符串字面量会被连接起来。比如,如果定义了宏 #define VERSION "0.1.0"
,那么 void print_version() { std::cout << "Version: " VERSION "\n"; }
等价于 void print_version() { std::cout << "Version: 0.1.0\n"; }
.
by jomy @ 2022-12-21 09:18:39
@cheche42 我就是个蒟蒻。
by X43344 @ 2023-07-10 15:49:37
提个小小的建议 最好结尾加一个"return 0"一般情况下加不加都可以,但有些你不加就会出问题。比赛时如果因为这个失分就很可惜了。