Characters are stored as ints anyway, A = decimal 65, B = dec' 66 etc. You should be able to typecast to ints, find the average, probably typecast the answer to float, then round up or down and cast ...
Type: Posts; User: Foffo Spearjig
Characters are stored as ints anyway, A = decimal 65, B = dec' 66 etc. You should be able to typecast to ints, find the average, probably typecast the answer to float, then round up or down and cast ...
They are identical, but both exist "to preserve compatibilitywith older versions of C" according to Herbert Schildts 'C The complete reference'.
Mind you, this book is widely regarded as being...
Don't know if you can test for eof on stdin, as unless re-directed using freopen(), this is the keyboard stream. No doubt one of the Guru's can put us straight on this.
Cheers,
foffo
Great! Does anyone know where I can download a Utopia84 Compiler from?
foffo spearjig
PS For the non-English of you, the above is meant to be gently ironic ( and I don't mean in the Alanis...
Hi,
I'm having trouble with the isam.h header file supplied for the CIL C&G 424 project. Basically it appears not to work! The Part Number is passed to it OK, it appears to access the Index file...
All I can say to Quzah and Prelude is thank you both for your help and expertise and does either of you have a match?
only I'm having a small book-burning session tonight and I don't have any on me....
Herbert Schildts "C the Complete Reference" entry on fflush( FILE *stream ); Doesn't explicitly warn against using it on input streams.
Also "All buffers are automatically flushed upon normal...
I've been using fflush() on input streams for over a year now on my Course assignments and have never been marked down or told not to use them! I have also never scored less than 85%.
For example:...
You could try using fflush( stdin ); after the first scanf, as the 2nd scanf might be reading the newline character.
fflush( stdin ); should clear the keyboard buffer and like vVv says, use fgets()...
Hi, I can send you my code for this, if you can help me with P1 Validate, fellow Computeach student!
My code works fine except for finding the missing name in the secret td.dat used by Computeach....
I'll show you the answer to this, if you show me how to test for a missing name field in P1, fellow Computeach student!
I've recently sent off both P1 and P2, I know P2 works from my own test data...
Sorry I should have been more specific.
I've already written a complete, working program that uses tags to determine the record type, that can find check digit errors, wrong tag code, non-digits...
no_one has the right idea,
create a new text file and immediately rename it with a .c extension, create a new workspace ( I've only ever used the Simple Console Application setting!) and paste...
Very informative but a little too much for this relative newbie!
Having done a little more research myself, I found some code containing the sort of stuff I was after.
#include "printer.h"
...
You can't use standard streams as far as I'm aware,
you need to define a FILE pointer with an appropriate name, then open the stream 'manually'.
Try something like this:
FILE *prn_fp;
/*...
Hi,
This is probably a very simple question, but none of my C course notes or reference books cover it. Can you write code to alter the default font, it's size, the page layout etc, from within a...