Beiträge von edison

    Hi!

    Ich will 2 Strings miteinander verbinden und hab
    folgenden Code geschrieben, der problemlos compiliert, aber:
    SEGMENTATION FAULT liefert !!!

    Gewünschtes Ergebnis wäre, 2 Files mit den Namen
    test.tok und test.lis zu öffnen


    FILE *fptok;
    FILE *fplis;

    char *tok_ende = "";
    char *lis_ende = "";
    char *tok = "";
    char *lis = "";
    char *filename_start = "";

    main(int argc, char *argv[])
    {
    if (argc > 1)
    {
    fp = fopen (argv[1], "r");
    strcpy (filename_start, "test\0");
    strcpy (tok_ende, ".tok");
    strcpy (lis_ende, ".lis");
    tok = strcat(filename_start, tok_ende);
    lis = strcat(filename_start, lis_ende);
    fptok = fopen(tok, "a");
    fplis = fopen(lis, "a");

    usw...


    wer hat eine Idee, woran das liegen könnte .....

    tom