Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 4ce79bd

Browse files
committed
Merge pull request #194 from milleniumbug/new_main
changed main() created by "New C++ project" option
2 parents 24e05e4 + dea6547 commit 4ce79bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/window.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void Window::set_menu_actions() {
218218
return;
219219
}
220220
std::string cmakelists="cmake_minimum_required(VERSION 2.8)\n\nproject("+project_name+")\n\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++1y -Wall -Wextra -Wno-unused-parameter\")\n\nadd_executable("+project_name+" main.cpp)\n";
221-
std::string cpp_main="#include <iostream>\n\nusing namespace std;\n\nint main() {\n cout << \"Hello World!\" << endl;\n\n return 0;\n}\n";
221+
std::string cpp_main="#include <iostream>\n\nint main() {\n std::cout << \"Hello World!\\n\";\n}\n";
222222
if(filesystem::write(cmakelists_path, cmakelists) && filesystem::write(cpp_main_path, cpp_main)) {
223223
Directories::get().open(project_path);
224224
notebook.open(cpp_main_path);

0 commit comments

Comments
 (0)