LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2012, 04:19 AM   #1
vectrum
Member
 
Registered: Jul 2011
Posts: 92

Rep: Reputation: Disabled
C++ api example for ncurses programming


Hello,

I'm looking for c++ api example for ncurses programming and needless
to say that it is not available except 7 part snake game development
video on youtube which is a bit difficult for a noob like me to
understand. GNU ncurse 5.9 documentation heading states that it has
c++ binding but couldn't find any.
I want to print simple output from cpp code inside ncurse console
window and want to use ncurse i/o like printw(),mvwprintw() etc.
with c++ i/o cout to print string or int values such as

cout << intX <<endl;

OR

cout << myObj->intVal<<endl;

and please let us know where the gnu c++ api example for ncurse is
available or where i should look into to get this with your help.
Thanks and regards...
 
Old 01-16-2012, 05:41 PM   #2
andywebsdale
Member
 
Registered: Jan 2005
Location: Lewisham,London,UK
Distribution: Debian Wheezy AMD64
Posts: 87
Blog Entries: 2

Rep: Reputation: 23
Try googling "ncurses C++ tutorial" - it returns loads of good links to just what you're looking for. Too many to list here, you'd have to pick your own favourite
Actually after having followed some of them I do see what you mean, there is a paucity of specifically C++ examples, I'm sorry to say

Last edited by andywebsdale; 01-16-2012 at 05:46 PM. Reason: admission of fail
 
1 members found this post helpful.
Old 01-16-2012, 05:56 PM   #3
andywebsdale
Member
 
Registered: Jan 2005
Location: Lewisham,London,UK
Distribution: Debian Wheezy AMD64
Posts: 87
Blog Entries: 2

Rep: Reputation: 23
I see the guy who does the "snake game" also does "Ncurses & C++" 1 to 5 from Hello world onward, then the snake game is number 6. Might be worth looking at 1 to 5 perhaps
 
1 members found this post helpful.
Old 01-17-2012, 05:30 AM   #4
vectrum
Member
 
Registered: Jul 2011
Posts: 92

Original Poster
Rep: Reputation: Disabled
Thanks andywebsdale for your reply and you are well aware of
the scarcity of c++ info on ncurses. I've downloaded ncurses 5.9 <latest ver>. It comes with c++ dir and a example file "demo.cc" is inside it with other helper files which describes the c++ functionality of ncurses 5.9 but it's also really difficult for me understand. That demo.cc is for building
different panels.

Youtube video part 1 to part 5 teach basics of ncurses
programming like setting up attributes, changing colour, font
etc. so these parts have no c++ specific information but
part 6 videos demonstrate c++ functionality.

Thanks again. )
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming in C using ncurses msaslin Programming 1 05-03-2010 10:52 AM
ncurses programming -- problems in Framebuffer mode? vharishankar Programming 6 12-13-2006 01:10 AM
Programming with NCurses indienick Programming 7 07-11-2006 02:56 PM
C programming HELP, ncurses window functions naomi Programming 3 02-06-2005 05:54 AM
Parallel programming with ncurses problem StressedLemming Programming 4 02-26-2004 11:54 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration