From dea65472ba14f475b97395cb02ffbf5be699813f Mon Sep 17 00:00:00 2001 From: milleniumbug Date: Tue, 5 Apr 2016 12:48:55 +0200 Subject: [PATCH] changed main() created by "New C++ project" option removing `using namespace std;` and usage of `endl`, replacing it with `\n` --- src/window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.cc b/src/window.cc index d2cb3e6..6c75e86 100644 --- a/src/window.cc +++ b/src/window.cc @@ -218,7 +218,7 @@ void Window::set_menu_actions() { return; } 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"; - std::string cpp_main="#include \n\nusing namespace std;\n\nint main() {\n cout << \"Hello World!\" << endl;\n\n return 0;\n}\n"; + std::string cpp_main="#include \n\nint main() {\n std::cout << \"Hello World!\\n\";\n}\n"; if(filesystem::write(cmakelists_path, cmakelists) && filesystem::write(cpp_main_path, cpp_main)) { Directories::get().open(project_path); notebook.open(cpp_main_path);