3 Replies - 935 Views - Last Post: 07 December 2008 - 02:01 PM Rate Topic: -----

#1 robc08  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-December 08

Need help on how to test escape sequences

Posted 07 December 2008 - 01:16 PM

I have to test the escape sequences. For the escape sequences that move the cursor, print a character before and after printing the escape sequence so it is clear where the cursor has moved. here is the escape sequences:
\'
\"
\\
\a
\b
\f
\n
\r
\t
\v

I just need what i need to do to test the sequences?
Is This A Good Question/Topic? 0
  • +

Replies To: Need help on how to test escape sequences

#2 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3120
  • View blog
  • Posts: 19,165
  • Joined: 14-September 07

Re: Need help on how to test escape sequences

Posted 07 December 2008 - 01:49 PM

What exactly do you mean by test? You could always put them in a program.
Was This Post Helpful? 1
  • +
  • -

#3 robc08  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-December 08

Re: Need help on how to test escape sequences

Posted 07 December 2008 - 02:00 PM

I know you have to add them to a program to test them, i just don't know how you would go about that. If you would just use a whole bunch of prints and test where the cursor moves or if there is some other way to go about it
Was This Post Helpful? 0
  • +
  • -

#4 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3120
  • View blog
  • Posts: 19,165
  • Joined: 14-September 07

Re: Need help on how to test escape sequences

Posted 07 December 2008 - 02:01 PM


cout << "After this sentence a newline will be printed.\n";

cout << "\t This sentence is tabbed once to the right";

//So on and so forth


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1