Search:

Type: Posts; User: george_1988

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    6,986

    Please wait for IDE scan?

    When I boot up I get a message displayed saying "Please wait for IDE scan"

    Following that it will display:

    Drive 0: HDS72808 0PLAT20
    Drive 1: not detected
    Drive 2: not detected
    Drive 3: not...
  2. I'm in love with fflush(stdin). That's just the...

    I'm in love with fflush(stdin). That's just the way it has to be! :(


    Edit: In all seriousness...

    How would I go about removing the newline left by my call to fgets() without using...
  3. Woops... Yeah I usually do something like: ...

    Woops...

    Yeah I usually do something like:



    len = strlen(file_name);
    if (file_name[len-1] == '\n')
    file_name[len-1] = 0;
  4. I had this same problem a few weeks ago trying to...

    I had this same problem a few weeks ago trying to open a text file.

    Just thought I'd add a reply to this aswell. My code assumes the person doesn't know the file extension and adds on ".txt" but...
  5. Replies
    7
    Views
    3,055

    Does using getch(); work any better? Also, can...

    Does using getch(); work any better?

    Also, can someone illustrate the reasons why fflush(stdin) should not be used?

    I'm not an expert or anything but I don't see what's wrong with it. When I...
  6. Replies
    8
    Views
    4,789

    ggraz, To achieve that you will need to use...

    ggraz,

    To achieve that you will need to use two loops. Look at the following code:



    #include <stdio.h>
    #include <ctype.h> /* for toupper() & tolower() */
    #include <string.h> /* for...
  7. Replies
    8
    Views
    4,789

    Try this: char input[51]; int i; ...

    Try this:



    char input[51];
    int i;

    printf("Enter something...\n");
    scanf("&#37;[^\n]", input);
  8. Replies
    17
    Views
    8,158

    I don't understand why you're having a problem...

    I don't understand why you're having a problem getting random numbers that vary.

    Just compile this code:



    #include <stdlib.h>
    #include <stdio.h>
    #include <time.h>
  9. Replies
    8
    Views
    4,666

    Thanks for all your replies. The fscanf...

    Thanks for all your replies.

    The fscanf function is what I was looking for, thanks Salem!
  10. Replies
    8
    Views
    4,666

    Hey guys, Thanks for replying. I am going to...

    Hey guys,

    Thanks for replying. I am going to try what you've suggested. I didn't think it would be so easy.

    In a nutshell, what I want to do is read the values back into the variables from...
  11. Replies
    8
    Views
    4,666

    Execute code from a text file?

    Hi,

    I have coded a very simple save function for a little game I'm messing about with at the moment. The program just writes all the variables to a text file.

    Say I have a "hitpoints" variable,...
  12. Replies
    9
    Views
    2,065

    Thanks for clearing that up :) Also, I've...

    Thanks for clearing that up :)

    Also, I've just been using fflush(); getchar(); because that's what I was shows to do from the beginning.

    I've been following the C programming tutorials by Mark...
  13. Replies
    9
    Views
    2,065

    Pointer error.

    Hello,

    I just have a quick question to ask...

    I am getting an "assignment from incompatible pointer type" in my code and I can't understand why.

    I have actually got this program to compile...
Results 1 to 13 of 13