Author Topic: "\n" on abbreviations changes to new line after closing Codeblocks.  (Read 12786 times)

Offline bugmenot

  • Multiple posting newcomer
  • *
  • Posts: 32
Hello, I am using codeblocks and I wrote a quick abbreviation for cout, it was something like:

Quote
cout << "|" << "\n";

But every time I close and open Codeblocks, the abbreviation changes to:

Quote
cout << "|" << "
";

Is there a way to maintain that literal "\n"? Thanks a lot.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: "\n" on abbreviations changes to new line after closing Codeblocks.
« Reply #1 on: September 05, 2008, 06:34:24 pm »
Try this:
Code
cout << "|" << endl;
Be patient!
This bug will be fixed soon...

Offline bugmenot

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: "\n" on abbreviations changes to new line after closing Codeblocks.
« Reply #2 on: September 05, 2008, 06:48:45 pm »
Oh yeah, I forgot to mention, I prefer using the "\n" instead of std::endl operator as long as I don't need to flush the buffer, and since I am writing really simple programs right now, I rarely need to do it.
Because of this abbreviation problem, I am using endl, but I'd like to know if there's a way to use the "\n" character without getting it changed to an actual newline on the abbreviation definition.

Thanks a lot.