Pregunta

Ive consiguió un problema con PDcurses mostrar algunos símbolos como? en lugar del carácter correcto. Hice un pequeño programa de prueba de código de visualización de la página 437 para determinar qué símbolos estaban trabajando, y que interrumpía.

Curiosamente, cuando apagué PDcurses los símbolos de problemas muestra correctamente.

Los símbolos son problemáticas ÇéâäàåçêëèïîÄæÆôöòûùÿÖÜ ¢ £ P ƒ

Este es el código fuente sin 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;
}

Este es el código fuente con 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;
}

Im que funciona con Windows XP Service Pack 3 y usando Microsoft Visual C ++ 2010 Express

¿Fue útil?

Solución

I came back and solved this one after a while. Turns out I was using the wrong version of PDcurses. From the ones available http://sourceforge.net/projects/pdcurses/files/pdcurses/3.4/ I was using pdc34dllw. I switched to pdc34dll and now it works perfectly.

Otros consejos

What happens when you make c a char instead of int in your second example?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top