NCurses C++ tutorial/documentation

This is a discussion on NCurses C++ tutorial/documentation within the Linux Programming forums, part of the Platform Specific Boards category; I was exploring NCurses but it is used like C. Apparently there are C++ bindings but I cannot find any ...

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    19

    NCurses C++ tutorial/documentation

    I was exploring NCurses but it is used like C. Apparently there are C++ bindings but I cannot find any decent documentation for new users. Does anyone know of any or perhaps could help me get started/write some.

    Thanks

    Ironfistchamp

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,807
    Well pretty much you just are going to use the C-Style functions in your C++ code is how it boils down to unless there is some sorta of wrapper classes.
    Woop?

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    19
    Well if it is the same what is the point in NDK++. I am really confused. I don't understand the whole C and printf() way of printing variables and that.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,510
    NDK++ is more than a C++ wrapper for NCurses. In fact that's just what you are looking for.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User
    Join Date
    Jun 2006
    Posts
    19
    There doesn't seem to be any documentation other than namespace lists and the such like.

    There is going to be no way I can use it without being taught how to one way or another. Do you know of anywhere I can find the information I am looking for. I tried looking at some examples I found and I just can't disect the code to understand.

    I am really in a bind I need to use C++ for the project but also need the power of ncurses to control the terminal.

    Thanks

    Ironfistchamp

  6. #6
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,510
    Anywhere in the web where you can find tutorials or documentation for NCurses will work for NDK or PDCurses.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #7
    Registered User
    Join Date
    Jun 2006
    Posts
    19
    Right so whatever I can find for ncurses works for NDK.... so what is the point in NDK?

    Remember people you are talking to a moron here

    No but seriously I do find this difficult to get my head around. I am going to Uni to do Games programming. I what to have something to wok with first. I thought the console and C++ would be a good place to start. NCurses seems to do what I want if I could use it.

    Thanks again

    Ironfistchamp

    PS: Mario F you are a total legend. Certified Ankle

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,510
    NCurses is for linux. NDK++, PDCurses and others, are multi-platform ports based on ncurses (new curses). So, for the most part any documentation for ncurses will be enough. And that's mainly why you don't see much documentation for these ports. It's already there.

    I do suggest PDCurses over NDK++ though. It's... more mainstream. It also comes with loads of examples you can read to understand how it works.

    ... and what do you mean?
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    Registered User
    Join Date
    Jun 2006
    Posts
    19
    Ah right now I understand it.

    The main problem I actually have with ncurses and all that is the input and output. I suppose I can get my head round it but it took a while for me to get the hang of the C++ cout and all that method. I don't suppose there is something like ncurses (or something that is ncurses) that works in a way like this. It seems much more natural and sensible than the C way.

    It's all this %d stuff I don't get. Thank you very much for your help. Any other input on the matter is very welcome.

    Thanks again

    Ironfistchamp

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 03-26-2009, 02:47 PM
  2. Ncurses or not?
    By Zarniwoop in forum C Programming
    Replies: 4
    Last Post: 05-04-2008, 11:19 AM
  3. Why I only get 8 colors out of ncurses?
    By Nazgulled in forum C Programming
    Replies: 3
    Last Post: 05-08-2007, 06:06 PM
  4. Ncurses and Standard Functions
    By gsoft in forum C Programming
    Replies: 2
    Last Post: 02-07-2005, 07:18 PM
  5. using the mouse with ncurses
    By dsharp in forum Linux Programming
    Replies: 2
    Last Post: 12-24-2003, 04:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21