Skip to Content
Hands-On Robotics Programming with C++
book

Hands-On Robotics Programming with C++

by Dinesh Tavasalkar
March 2019
Intermediate to advanced
312 pages
7h 37m
English
Packt Publishing
Content preview from Hands-On Robotics Programming with C++

ncurses functions

After installing the ncurses library, let's explore some of the important functions that are a part of this library:

  • initscr(): The initscr() function initializes the screen. It sets up the memory, and clears the command window screen.
  • refresh(): The refresh function refreshes the screen.
  • getch(): This function will detect the user's touch, and will return the ASCII number for that particular key. The ASCII number is then stored in an integer variable, which is later used for comparison purposes.
  • printw(): This function is used to print string values inside the command window.
  • keypad(): If the keypad function is set to true, we can also take the user's input from the function keys, as well as the arrow keys.
  • break
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Robotics Programming

Learn Robotics Programming

Danny Staple
C++ Reactive Programming

C++ Reactive Programming

Praseed Pai, Peter Abraham

Publisher Resources

ISBN: 9781789139006Supplemental Content