2

Every time I create a new project in CLion the default main.cpp is written like this:

#include <iostream>

int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

But I want it to look like this:

/**/

#include <iostream>

using namespace std;

int main(){
    return 0;
}

I searched everywhere but can't undestand how to do it.

Thank you in advance.

sorcho
  • 21
  • 2
  • 1
    See [File templates](https://www.jetbrains.com/help/clion/using-file-and-code-templates.html) from the CLion documentation. You may also want to read [Why is "using namespace std;" considered bad practice?](https://stackoverflow.com/q/1452721/11082165) – Brian61354270 Nov 26 '21 at 14:59
  • @Brian I tried using the templates but nothing changes, I don't know if I'm making any mistake but my brain is exploding. – sorcho Nov 26 '21 at 16:40
  • Does this answer your question? [CLion : how to change default code when I make new project?](https://stackoverflow.com/questions/43567774/clion-how-to-change-default-code-when-i-make-new-project) – Brian61354270 Nov 28 '21 at 21:32

0 Answers0