Search:

Type: Posts; User: fuso

Search: Search took 0.01 seconds.

  1. Replies
    46
    Views
    4,212

    When I define the variables as ints, the %d is...

    When I define the variables as ints, the %d is rounded to a whole number in the printf call, why is it doing that?
  2. Replies
    46
    Views
    4,212

    Ok, another one Trying to print the 'average...

    Ok, another one

    Trying to print the 'average word length' which I'm trying to define as total characters/total words

    Do all of these variables need to be defined as doubles from the offset?

    ...
  3. Replies
    46
    Views
    4,212

    aha! Thanks!

    aha!

    Thanks!
  4. Replies
    46
    Views
    4,212

    That's what I thought I'd done... else...

    That's what I thought I'd done...



    else if(text_input = ' ')
    word_count++;
  5. Replies
    46
    Views
    4,212

    Ok, another quick question, more to do with the...

    Ok, another quick question, more to do with the logical side of things.

    Basically I've added a few lines in order to make a word count - using the number of spaces + 1, however my program seems to...
  6. Replies
    46
    Views
    4,212

    I'm using the Borland C++ Yeah it does prompt...

    I'm using the Borland C++

    Yeah it does prompt me for a file name, in fact the whole thing works pretty well
  7. Replies
    46
    Views
    4,212

    Hmm, ok it doesn't notepad anymore, and in fact...

    Hmm, ok it doesn't notepad anymore, and in fact just freezes the command prompt
  8. Replies
    46
    Views
    4,212

    Ok so now it's physically opening the file I type...

    Ok so now it's physically opening the file I type in (i.e. it loads notepad), which is intereting - a good thing you say?

    How come it's ignoring the rest of my code after that?
  9. Replies
    46
    Views
    4,212

    Here is the appended version (I hope!) It now...

    Here is the appended version (I hope!)

    It now freezes after returning a file name...



    #include <stdio.h>

    #define ALPHABET_TOTAL 26
  10. Replies
    46
    Views
    4,212

    Are these ammendments a necessity in order for...

    Are these ammendments a necessity in order for the program to work? Or are they sophisticated tricks?

    I don't think I'm going about the right way of reading characters from the file either; do I...
  11. Replies
    46
    Views
    4,212

    Ok, I think I'm using fgets properly... This...

    Ok, I think I'm using fgets properly...

    This program is doing my head in. I'm struggling. It doesn't work. Any freindly help would be greatly appreciated!




    FILE *fp; ...
  12. Replies
    46
    Views
    4,212

    I think for my purposes, gets() should be fine -...

    I think for my purposes, gets() should be fine - the filename will not be longer than 99 characters.

    Do I define 'filename' as a string?
  13. Replies
    46
    Views
    4,212

    Quick question regarding file opening; My...

    Quick question regarding file opening;

    My compiler tells me I have an undefined symbol 'filename' in function main; how (and where) do I define it?



    printf("Type a file name, followed...
  14. Replies
    46
    Views
    4,212

    Cheers guys - I think I do need to try and...

    Cheers guys - I think I do need to try and comprehend the program as a whole more

    Quick question - is it possible to includemore than one 'else if' branch?

    so in this context:



    while(...
  15. Replies
    46
    Views
    4,212

    Hi guys, newbie here, some questions!

    Hi there :)

    Ok, basically I'm pretty new to C and have created a mashed-together program using different elements from different existing programs:



    #include <stdio.h>

    #define...
Results 1 to 15 of 15