Hello everyone,
I have some problems with this program that does very basic calculations.
#include <stdio.h>
#define true 1
#define false 0
Type: Posts; User: prepare
Hello everyone,
I have some problems with this program that does very basic calculations.
#include <stdio.h>
#define true 1
#define false 0
thanks guys.
Just downloaded this but seem to be having some trouble running my programs.
They compile and run, but once the dos window has come up it immediatly closes and doesnt seem to wait for me to "press...
Thanks for all the help guys. :)
Done as much as I can, have to demo it tomorrow but spent so much time on this im sick of it.
cheers,
ok this is the last hurdle. I need to perform an integer validation check. Now before anyone tells me to search, i have but couldnt find anything I understoof 100%, or even 50% and i really dont want...
ok im getting somewhere.
newParts_struct newParts;
char id[7];
char description[26];
int quantity;
fscanf(supplyFile, "%6c %25c %d ", id, description, &quantity);
id[6] = '\0';
yeah that was a typo.
not sure what you mean by this.
you mean when I decale newParts.id in my structure?. make it null instead of a char?
Ok im still having problems. :(
the code didnt work because my function newParts = readNewSupply(supplyFile) was trying to read a text file like a binary file.
so Ive changed it to just use...
silly mistake :mad:
ah..I dont think i understood exactly how !feof worked. Are you saying that once it has run through once it wont go through the innner loop again because it thinks its...
quzah, i have read the FAQ, but this is the way we have been taught to do it in class and ive never had any problems with it displaying the last line twice like the FAQ says. then again maybe the...
sorry for bugging you guys, last question i promise ;)
Ok this code needs to
1)read id and quantity records from a newSupply.txt
2)read id record from inventory.dat
3)if there is a...
Thanks guys.
can anyone give me some help?
I know its something to do with the way im incorrectly passing vairables down through the functions but i cant work it out :confused:
Thanks Salem,
by passing parameters you mean passing the variables through the functions rather then declaring them in callfunction? if you understand that...
#include <stdio.h>
#include...
this program is meant to read the binary file, display output on the screen then write the binary files contents to a text file.
#include <stdio.h>
#include <ctype.h>
#define inFileName...
thanks dave that worked great, I dont really understand what you have done however.
unsigned int lines = 0;
why an unsigned int? whats the difference between that and a normal int?
if...
Hi guys,
I have a problem. My program is reading a binary file and displaying pages and pages of output and I want to sort this out by displaying 20 or so lines a page
void dataPrint(void)...
Would there be any reason why a binary file displays perfectly on my lab computer at school (using textpad) but then doesnt display when I try the exact same code at home (using Pelles C)?
ahh thanks didnt think of that.
thought there might have been a specifc command to do this.
Hi,
Does anyone know what command I would use if I wanted to display the output of a file but only 10 lines at a time? and then have the user hit enter or something to display another 10?
...