1
구조체에서 가져 오는 ncurses 확장 문자를 표시하려고합니다. 내가 사용하려고하면구조체에서 ncurses 확장 문자 사용
는 : 숫자 값을 저장
#include <ncurses.h>
struct TEST_STRUCT
{
int nCharacter; // Where I want to store variable for printed character
short nTestNumber; // Other stuff in struct
};
TEST_STRUCT sTestData[] = {
{ '.', 1 }, // Period
{ ',', 2 }, // Comma
{ 4194424, 1 } // Vertical Line
};
int main(void)
{
initscr();
clear();
for(int n = 0; n < 3; n++)
{
addch(sTestData[n].nCharacter); // print the characters in the struct
}
endwin();
return 0;
}
:
ACS_VLINE 문자가 제대로 표시되지 않습니다#include <ncurses.h>
struct TEST_STRUCT
{
char nCharacter; // Where I want to store variable for printed character
short nTestNumber; // Other stuff in struct
};
TEST_STRUCT sTestData[] = {
{ '.', 1 }, // Period
{ ',', 2 }, // Comma
{ ACS_VLINE, 1 } // Vertical Line
};
int main(void)
{
initscr();
clear();
for(int n = 0; n < 3; n++)
{
addch(sTestData[n].nCharacter); // print the characters in the struct
}
refresh();
endwin();
return 0;
}
,하지만 약간의 장난 후에, 나는 다음과 같은 작품을 발견 이것은 int에있어서 잘못된 것 같지만 작동합니다. 나는 이것을 "올바르게"행하기 위해 어떻게해야 하는가?