Search:

Type: Posts; User: purplechirin

Search: Search took 0.00 seconds.

  1. Replies
    31
    Views
    9,952

    Well, on my first attempt I was using Netbeans to...

    Well, on my first attempt I was using Netbeans to create an empty text file which i added 10 words in for testing, and then on the second attempt I used the word list generated on unix.. Same results...
  2. Replies
    31
    Views
    9,952

    While i do the printing in hex.. here are the...

    While i do the printing in hex.. here are the codes:

    Code that opens the 'valid word list':

    FILE *dict;
    dict = fopen(filename, "r");

    Code that reads the word:

    for (i=0; fgets(words[i],...
  3. Replies
    31
    Views
    9,952

    the double quote somewhat disappeared.. there's...

    the double quote somewhat disappeared.. there's no extra " on the second line.

    edit: i changed it a little, and instead of a double quote i put different symbols:


    printf("!%s@, #%s$\n",...
  4. Replies
    31
    Views
    9,952

    ehh.. i tried that and it printed out "string1",...

    ehh.. i tried that and it printed out "string1", "string1 (without the last double quote). where did it go?? is that the problem? :confused:
  5. Replies
    31
    Views
    9,952

    It is an assignment, but I'm not looking for the...

    It is an assignment, but I'm not looking for the solution - i just need help with particular parts that I seem to have problems with. :)

    About the design, I do have a sketch of the flowchart...
  6. Replies
    31
    Views
    9,952

    do you mind explaining how it's supposed to be...

    do you mind explaining how it's supposed to be done? i'm really lost at this. not typecasting is it?
  7. Replies
    31
    Views
    9,952

    Thanks, I'll try to get the array size problem...

    Thanks, I'll try to get the array size problem fixed.

    But back to my other question, why would printf("%s, %s\n", token, words[i]); output "string1, string1", but when I use strcmp(token,...
  8. Replies
    31
    Views
    9,952

    I declared the array as char words[i][j]; (i and...

    I declared the array as char words[i][j]; (i and j are arbitrary numbers for me to test files that contain only a few lines - here I put char words[10][10];)

    I tried using sizeof(words), but it...
  9. Replies
    31
    Views
    9,952

    Umm, to specify the boundary for the for-loop.....

    Umm, to specify the boundary for the for-loop.. The size of the 'dictionary', i.e, char word[][]. Initially I put for (i=0; i<strlen(words); i++) (same thing, only without the asterisk), but the...
  10. Replies
    31
    Views
    9,952

    Yup, I did, and the 'dictionary' array (i.e....

    Yup, I did, and the 'dictionary' array (i.e. words[]) prints out fine when i do a simple loop to print out all the elements..
  11. Replies
    31
    Views
    9,952

    Oh dear, I'm really sorry I tend to skip a lot of...

    Oh dear, I'm really sorry I tend to skip a lot of details when I post my question..

    My actual part of the code that does (or is supposed to do) the string compare is:



    /* this whole chunk...
  12. Replies
    31
    Views
    9,952

    Well, it really is a simple spell checker.. Read...

    Well, it really is a simple spell checker.. Read a text file containing 'dictionary' words, read another text file containing paragraphs of words, and print out if any of the words are not in the...
  13. Replies
    31
    Views
    9,952

    It works! Thanks for your help!! :D Now...

    It works! Thanks for your help!! :D




    Now it comes to another problem.. How do I remove the newline character (\n) from the words that was copied from fgets??
  14. Replies
    31
    Views
    9,952

    Simple spell checker

    I have a function in my spell checker codes to load words from a text file and store them in an array of strings.. Problem is, I can't figure out how to correct it.

    For instance, the 'dictionary'...
Results 1 to 14 of 14