提示コードですがAAを画面に表示させたいのですがstring型のコンストラクタに入れると対処法のわからない構文エラーが出るのですが
これは何をどう修正すればいいのでしょうか? どうして文字列だけなのにエラーがでるのでしょうか?
参考サイト:https://patorjk.com/software/taag/#p=testall&f=Graffiti&t=Image%0A%E3%80%80%E3%80%80Converter%0A
Error
shigurechan@shigurechan-System-Product-Name:~/Project/ImageConverter$ make g++ -c -MMD -MP src/MainMenu.cpp -o obj/MainMenu.o src/MainMenu.cpp:15:21: warning: missing terminating " character 15 | std::string str(" | ^ src/MainMenu.cpp:15:21: error: missing terminating " character src/MainMenu.cpp:20:8: warning: missing terminating ' character 20 | | || '_ ` _ \ / _` |/ _` |/ _ \ | ^ src/MainMenu.cpp:20:33: warning: backslash and newline separated by space 20 | | || '_ ` _ \ / _` |/ _` |/ _ \ | src/MainMenu.cpp:20:8: error: missing terminating ' character 20 | | || '_ ` _ \ / _` |/ _` |/ _ \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 21 | _| || | | | | | (_| | (_| | __/ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/MainMenu.cpp:22:2: error: stray ‘\’ in program 22 | \___/_| |_| |_|\__,_|\__, |\___| | ^ src/MainMenu.cpp:22:17: error: stray ‘\’ in program 22 | \___/_| |_| |_|\__,_|\__, |\___| | ^ src/MainMenu.cpp:22:23: error: stray ‘\’ in program 22 | \___/_| |_| |_|\__,_|\__, |\___| | ^ src/MainMenu.cpp:22:29: error: stray ‘\’ in program 22 | \___/_| |_| |_|\__,_|\__, |\___| | ^ src/MainMenu.cpp:26:7: error: stray ‘\’ in program 26 | / __ \ |
source code
cpp
1 2bool MainMenu::Loop() 3{ 4 5 std::string str(" 6 _____ 7|_ _| 8 | | _ __ ___ __ _ __ _ ___ 9 | || '_ ` _ \ / _` |/ _` |/ _ \ 10 _| || | | | | | (_| | (_| | __/ 11 \___/_| |_| |_|\__,_|\__, |\___| 12 __/ | 13 |___/ 14 _____ _ 15 / __ \ | | 16 | / \/ ___ _ ____ _____ _ __| |_ ___ _ __ 17 | | / _ \| '_ \ \ / / _ \ '__| __/ _ \ '__| 18 | \__/\ (_) | | | \ V / __/ | | || __/ | 19 \____/\___/|_| |_|\_/ \___|_| \__\___|_| 20 21 "); 22 23 24 25 26 Console::Draw(Console::ColorCode::White,Console::ColorCode::Black,nullptr,"Image Converter\n\n"); 27 Console::Draw(Console::ColorCode::White,Console::ColorCode::Black,nullptr,"drag image or directory > "); 28 29 if(Console::InputString() == std::string("exit")) 30 { 31 return false; 32 } 33 34 35 36 37 38 39 40 41 return true; 42} 43 44 45

回答2件
あなたの回答
tips
プレビュー