close

extern "C" {
    #include "unpthread.h"
}
#include <stdio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

#include <netdb.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
#include <unistd.h>
#include <memory>
#include <string.h>
#include <math.h>
#include <time.h>
#include <sys/timeb.h>
#include <sys/time.h>
#include <fcntl.h>
#include <sys/uio.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ctype.h>
#include <semaphore.h>
#include <netinet/tcp.h>
#include <sys/un.h>
#include <pthread.h>
#include <sys/time.h>
#include <semaphore.h>
#include <sys/mman.h>
#include <fcntl.h>

int main(int argc, char* argv[])
{

    GKeyFile *keyfile;
    GKeyFileFlags flags;
    GError *error = NULL;
    keyfile = g_key_file_new();
    flags = (GKeyFileFlags) (G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS) ;
    if (!g_key_file_load_from_file (keyfile, "/ZEUSING/datafeed/UDPMarketData.ini", flags, &error)){
        printf("reading UDPMarketData.ini error...stop program \n") ;
        return 0 ;
    }
    char mm1[18]={0} , mm2[18]={0} ,mm3[18]={0} ,mm4[18]={0}  ;
    strcpy( mm1,g_key_file_get_string(keyfile, "datafeed", "instrumentid1", NULL) ) ;
    strcpy( mm2,g_key_file_get_string(keyfile, "datafeed", "instrumentid2", NULL) ) ;
    strcpy( mm3,g_key_file_get_string(keyfile, "datafeed", "instrumentid3", NULL) ) ;
    strcpy( mm4,g_key_file_get_string(keyfile, "datafeed", "instrumentid4", NULL) ) ;

    printf("instrumentid1:... (%s)\n",mm1 );
    printf("instrumentid2:... (%s)\n",mm2 );
    printf("instrumentid3:... (%s)\n",mm3 );
    printf("instrumentid4:... (%s)\n",mm4 );

}

 

arrow
arrow
    全站熱搜

    hedgezzz 發表在 痞客邦 留言(0) 人氣()