Search:

Type: Posts; User: ccoder01

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    3,439

    hey does anyone know a good way to count the...

    hey does anyone know a good way to count the number of words in a file...i posted one earlier but it doesnt work very well...

    thanks
  2. Replies
    1
    Views
    5,437

    looking for good word count algorithm?

    hey does anyone know a good way to count the number of words in a file...i posted one earlier but it doesnt work very well...

    thanks
  3. Replies
    3
    Views
    3,439

    no worries...i figured it out... code below ...

    no worries...i figured it out... code below



    int fileLength(FILE *file) {

    int file_len=0;
    char line[LINESIZE];
    char *linePtr = line;
  4. Replies
    3
    Views
    3,439

    counting the number of words

    hi everyone,

    for some reason im getting a segfault when i run this code to count how many words there are in the file...also if theres a better way to do it ..please let me know thanks...
    ...
  5. Replies
    3
    Views
    1,214

    linked list bug

    hi all,

    i still couldnt fix the bug...so ive just tried to copy an example out of a textbook.. the code below simply puts the letter a in a list ...and then i attempt to print the list...when i...
  6. Replies
    3
    Views
    1,214

    simple Linked Lists help

    hey everyone,

    im just trying to add a new node to the end of this list and print the list out...can someone tell me what i am doing wrong..thanks alot




    #include <stdio.h>
    #include...
  7. Replies
    5
    Views
    925

    Simple seg Fault Problem

    hi everyone...

    could someone please tell me why im getting a seg fault here...its a very small example...and i would appreciate if someone could rewrite this without the fault...thanks..btw the...
  8. regex searching problem...it works, but doesnt stop

    hi everyone,

    i finally got my code to search mulitple times against a string..

    ie. the string is :

    <title>hi all</title><dummy>sdf</dummy><title>hi everone</title>

    and i search for...
  9. Replies
    3
    Views
    653

    Re:

    this is how i loaded the file into a string...

    fgets only takes 3 arguments...where can i specify what \n will be


    char *fgets(char *s, int size, FILE *stream);
  10. Replies
    3
    Views
    653

    removing \n from a file

    hi,

    does anyone know a quick way to remove all \n from a file that has been loaded into memory...ie. i have a file loaded into a string ...and it has all \n in it!...thanks..
  11. k... i fixed that...still doesnt work..any other...

    k... i fixed that...still doesnt work..any other suggestions?

    thanks..
  12. regex searching problem -> i cant get more than one result

    hi everyone,

    im searching a string using regex and it works fine...but it only returns me the first result...im trying to store all the results(indicies) in an array, and return it..

    thanks for...
  13. Replies
    12
    Views
    2,437

    thanks for all ur help ppl...i fixed all my...

    thanks for all ur help ppl...i fixed all my memory problems :)
  14. Replies
    12
    Views
    2,437

    thats correct...each time i add something to the...

    thats correct...each time i add something to the array...all i need is one int...
    which is 1 element...isnt it?
  15. Replies
    12
    Views
    2,437

    ok...ive fixed the problem in setSearchTag...i...

    ok...ive fixed the problem in setSearchTag...i needed to use calloc instead of malloc....

    but i now get a bus error in the search method above...gdb tells me its on the line where i do my realloc...
  16. Replies
    12
    Views
    2,437

    i still couldnt find the problem...i steped...

    i still couldnt find the problem...i steped through setSearchTag()...it does exactly what i want...but if...i print the variable file before and after the method call...it changes....which is really...
  17. Replies
    12
    Views
    2,437

    maybe u needed more detail to help me... here...

    maybe u needed more detail to help me...

    here is where i called it...and the variable that was stuffing up is file (passed into searchForTags()...




    void searchForTags(char *file) {
    ...
  18. Replies
    12
    Views
    2,437

    this is C....???? compiled using gcc!...anyone...

    this is C....???? compiled using gcc!...anyone know how to fix
  19. Replies
    12
    Views
    2,437

    memory allocation problem

    hi,

    there is a memory allocation problem in this method..because although it compiles and runs ok...it stuffs up one of my other variables...

    can someone please help

    thanks alot
  20. Replies
    6
    Views
    1,504

    also 1 more thing....why is it now...when i call...

    also 1 more thing....why is it now...when i call setSeachTag() again....it gives me a bus error
    on the malloc line?


    currentSearch = setSearchTag("title", currentSearch);
    currentSearch =...
  21. Replies
    6
    Views
    1,504

    cool ..thanks

    cool ..thanks
  22. Replies
    6
    Views
    1,504

    seg fault when printing string

    hi,

    i get a seg fault when i try to print the currentSearch ...and suggestions?

    thanks




    char *currentSearch = NULL;
  23. Replies
    3
    Views
    959

    is there any other way i can copy the contents of...

    is there any other way i can copy the contents of a file into a string..?
  24. Replies
    3
    Views
    959

    copying file into string - not working?

    hi,

    im just simply copying the whole contents of a file from the net into a string in my program and printing it out...this doesnt work,,any suggestions on how to fix or do it another way?



    ...
  25. please look at the function printheadlines ......

    please look at the function printheadlines ... tempPtr is pointing to something...

    tempPtr = arrayOfStories [i];
    tempStory = *tempPtr;
Results 1 to 25 of 29
Page 1 of 2 1 2