0

from the following question I begin to know the meaning of \f in c++: Escape sequence \f - form feed - what exactly is it? but why c++ have this formfeed character? is there any c++ program that runs on a typewriter?

Community
  • 1
  • 1
Y.L.
  • 1,274
  • 6
  • 23
  • 39
  • 3
    I figure C++ reserves it because C reserved it, and C reserved it because it was meaningful at one point. – Patashu Jun 28 '13 at 05:37

2 Answers2

5

The formfeed character is not only for typewriters, it's universally recognized by all printers (or printer drivers) to stop the current page and advance to the next.

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
1

There is a number of characters that can be expressed with notation like \t, \b, etc. There is nothing magic in this list. This is just a simple way to insert characters with values less than space (0x20) into the string. The list of these characters has primarily historical base. These chars are used in old programs. Why should they stop compiling? The negative impact from this feature is minimal to none.

The language itself does not put any meaning into these chars. They are simply placed into a string or char constant. The program deals with them.

Kirill Kobelev
  • 10,252
  • 6
  • 30
  • 51