我在pdcurses上显示一些符号的问题是吗?而不是合适的角色。我制作了一个小测试程序,以显示代码第437页,以确定哪些符号正在起作用以及哪些符号。

奇怪的是,当我关闭pdcurs时,会正确显示问题符号。

问题符号是çéâäàåçêëèïîäææø极分

这是没有pdcurses的源代码:

#include "stdafx.h"
#include <curses.h>
#include <iostream>
#include <panel.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[]) 
{
    //initscr();
    char c;
    for (int a = 0; a < 16; a++)
    {
        for (int b = 1; b < 17; b++)
        {
            move(a, b - 1);
            c = b + (a * 16) - 1;
            //addrawch(c);
            cout << c;
        }
        cout << "\n";
    }
    //refresh();
    //getch();
    //endwin();
    return 0;
}

这是带有pdcurses的源代码:

#include "stdafx.h"
#include <curses.h>
#include <iostream>
#include <panel.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[]) 
{
    initscr();
    int c;
    for (int a = 0; a < 16; a++)
    {
        for (int b = 1; b < 17; b++)
        {
            move(a, b - 1);
            c = b + (a * 16) - 1;
            addrawch(c);
            //cout << c;
        }
        //cout << "\n";
    }
    refresh();
    getch();
    endwin();
    return 0;
}

我正在运行Windows XP Service Pack 3并使用Microsoft Visual C ++ 2010 Express

有帮助吗?

解决方案

一段时间后,我回来了,解决了这个问题。原来我正在使用错误的版本的pdcurses。从可用的 http://sourceforge.net/projects/pdcurses/files/pdcurses/3.4/ 我正在使用pdc34dllw。我切换到PDC34DLL,现在它运行得很好。

其他提示

当你做什么 C 一个 char 代替 int 在您的第二个示例中?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top