コード例 #1
0
int main()
{
	struct month *month_current;//월 포인터 구조체 선언
	month_current = (struct month *) malloc(sizeof(struct month));//Linked List 활용을 위한 구조체 동적할당
	month_current->next = NULL;
	month_current->month = 0;
	printf("┌────────────────┐\n");
	printf("│        * N O T I C E *         │\n");
	printf("│ 문자열의 입력은 한글은 다섯자  │\n│ 영문은 열자까지 가능합니다.    │\n");
	printf("└────────────────┘\n");
	noData(month_current);
	menu(month_current);
	return 0;
}
コード例 #2
0
ファイル: client.cpp プロジェクト: NustyNUts/GalsRepeater
Client::Client():
    m_hostAddr("192.168.1.25"),
    m_hostPort(12345)
{
    m_server = new QTcpServer(this);
    m_soket = new QTcpSocket();
    m_timer = new QTimer();
    m_timerCheckData = new QTimer();
    m_connectState = false;

    connect(m_timerCheckData,SIGNAL(timeout()),this,SLOT(noData()));
    connect(m_timer,SIGNAL(timeout()),this,SLOT(openConnection()));
    connect(m_soket,SIGNAL(connected()),this,SLOT(connected()));
    //connect(m_soket,SIGNAL(disconnected()),this,SLOT(disconnected()));
    connect(m_server,SIGNAL(newConnection()),this,SLOT(newConnect()));
    m_server->listen(QHostAddress::Any,m_hostPort);
    m_timer->start(1000);
    m_timerCheckData->start(105);

}