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...
Type: Posts; User: george_1988
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...
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...
Woops...
Yeah I usually do something like:
len = strlen(file_name);
if (file_name[len-1] == '\n')
file_name[len-1] = 0;
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...
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...
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...
Try this:
char input[51];
int i;
printf("Enter something...\n");
scanf("%[^\n]", input);
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>
Thanks for all your replies.
The fscanf function is what I was looking for, thanks Salem!
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...
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,...
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...
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...