pdcurses

How to download, build and include PDCurses in Visual Studio 2019 for C++ on Windows

只谈情不闲聊 提交于 2021-02-11 15:14:24
问题 I'm fairly new to C/C++ but have never tried to include external libraries before in my projects as I've mostly been doing tutorials and such. These have been mostly console applications/games. When I was looking for an alternative to the "evil" system(" ") commands I was pointed to Curses. Now I've gone to the GitHub for both branches of the PDCurses source library (wmcbrine's branch and Bill-Gray's Branch) but every time I try to build library it returns multiple errors (happy to provide a

C++ code reduction for identical submenus

荒凉一梦 提交于 2020-12-08 05:15:27
问题 I am coding my way to the last project of the semester and I have a code duplication issue. I am using ncurses or pdcurses to make a menu to interact with the user. The problem: For each choice of the menu(Five in total) I need a submenu. The submenu's only difference from the main menu is, the array of Items to be printed, and the parameters that go into some functions, as a result of the Items array size. Since I need five submenus, I need five times the same code(six if you add the main

pdCURSES and addstr compatibility with strings problems

无人久伴 提交于 2020-01-25 18:50:49
问题 Hey so i'm trying to get addstr() in pdCurses to work (windows curses) with the preferred string class so I made the function the following string_to_80char() function, which is supposed to take a string and return an 80 character long char array (the number of characters fit on one line in the console) since this is the only parameter addstr seems to accept... However when running the following code i do get the "Just a string" printed but with a random character like an '@' or '4' like 50

PDCurses resize_term arbitrarily fails or succeeds

℡╲_俬逩灬. 提交于 2020-01-05 04:31:08
问题 I'm trying to resize the terminal window I've been printing in with PDCurses. It only works sometimes. Otherwise it just sets itself to the default size, not even returning an error. Examples of sizes that work: resize_term(50, 50); resize_term(100, 100); resize_term(51, 100); resize_term(50, 51); resize_term(2, 60); Examples of sizes that don't work: resize_term(51, 51); resize_term(51, 50); resize_term(100, 51); resize_term(60, 2); Does anyone know why these certain ranges of sizes don't

PDcurses displaying question marks in place of intended character

倾然丶 夕夏残阳落幕 提交于 2019-12-24 15:42:12
问题 Ive got a problem with PDcurses displaying some symbols as ? instead of the proper character. I made a little test program to display code page 437 to determine which symbols were working and which werent. Strangely, when I turned off PDcurses the problem symbols displayed correctly. The problem symbols are ÇéâäàåçêëèïîÄæÆôöòûùÿÖÜ¢£₧ƒ This is the source code without PDcurses: #include "stdafx.h" #include <curses.h> #include <iostream> #include <panel.h> using namespace std; int _tmain(int

Install pdcurses on Visual Studio 2017

落爺英雄遲暮 提交于 2019-12-21 18:38:13
问题 I was making a 2048 game on CodeBlocks, but due to debugging problems, I move to Visual Studio Community 2017. It seems that conio.h doesn't work there, so I'm trying to switch to curses.h library. I've read a lot of tutorials, but none of them worked for me. I visited their website and downloaded the zip file with 384KB, but I do not know what to do with these files. Help, please? 回答1: I have found a very useful website which talks about PDCurses and its installation in Visual Studio. Even

pdcurses linkage using Visual Studio 2010

北城以北 提交于 2019-12-21 05:31:25
问题 This is doing my nut in. I'm just trying to include pdcurses (i.e. ncurses for windows) into a test program. Linkage though is failing. Using Visual Studio 2010. I'm fully aware of setting up the correct link additional libraries path and to list the libraries themselves. No joy. I've tried the various pre-builts on the pdcurses website. No such luck. I of course resorted to building from source. Using nmake from the Visual Studio command prompt as prescribed. Built ok. Nada on link. What am

Console interface tutorials and tips (pdcurses)

两盒软妹~` 提交于 2019-12-21 05:00:37
问题 I'm looking for tutorials on using PDCurses library. Unfortunately there is text only documentation, which is more like function reference. Are pdcurses similar enough to ncurses to use ncurses tutorials??? Any tips for making console UI's ??? PS. PDCurses - mingw32. 回答1: This blog entry isn't anything I'd call a tutorial but it looks like it might be an interesting starting point. It is featuring a (very, very basic) video tutorial on YouTube as well. 回答2: You can always use this tutorial

How to link curses.h in Cmake?

萝らか妹 提交于 2019-12-20 02:06:45
问题 I know that maybe this is a silly question but I can't see through it, I searched for other answers here, that are pretty close to mine, but, still, I didn't understand how to do it. The problem is that I can't compile a 'C' program that uses curses.h in Windows (I'm using Clion with MinGW), when I try to do it, it gives "undefined reference" for functions in curses.h (Such as 'initscr', 'clear', ...). Through MinGW Installation Manager I installed "mingw-32-libpdcurses" (There were two

Check char at current/given position in PDCurses/NCurses

南楼画角 提交于 2019-12-17 19:53:01
问题 Is there a way to check which char is at a given position in the console window? For example if I want to check if there's an asterisk (*) at position (10, 12), how do I do that? Or if I use move(10, 12); , how do I check which char is at the current cursor position? I'm using PDCurses. 回答1: The inch family of functions should do that: chtype inch(void); chtype winch(WINDOW *win); chtype mvinch(int y, int x); chtype mvwinch(WINDOW *win, int y, int x); 来源: https://stackoverflow.com/questions