Search:

Type: Posts; User: gioullis

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    5,851

    adding text from file to a linked list

    i am trying to add words from a text file to a linked list. my code works fine , but if the text file is too big it shows the following error: stack smashing detected. Can anyone help me please here...
  2. Replies
    1
    Views
    5,204

    reading line by from file without fgets

    I want to read from file line by line without using fgets. I have the following code but in the end crashes and i can not find the what is the problem


    # include <stdio.h>
    # include <stdlib.h>...
  3. Replies
    5
    Views
    7,268

    file filter extension in c

    How i can create file filter extension in c. For example i want the fopen function works only with files that ends with .txt extension
  4. i used fscanf instead of strtok and problem...

    i used fscanf instead of strtok and problem solved. Anyway thanks guys for the help
  5. i have changed my list_add function like this ...

    i have changed my list_add function like this


    int list_add(char *string){
    struct list *curr;
    char *str;
    curr = (struct list *)malloc(sizeof(struct list));
    str= (char...
  6. I malloc space for the line buffer in open file...

    I malloc space for the line buffer in open file and now is printing me the last character of the text file, sometimes with a couple of spaces as the elements of the list.
    Where i must make a copy of...
  7. extract words from a text file and save them to a linked list

    ​i have a problem in my code. I want to read lines from a text file and split the line into words and save each word to a linked list. In main method first i am calling the init_list function to init...
Results 1 to 7 of 7