sorry I am just being stupid now. I didn't mean newline I ment null
Type: Posts; User: task
sorry I am just being stupid now. I didn't mean newline I ment null
It is:
char string1[21]; /* 20 characters plus newline character */
I have allowed for the newline character when I created it.
what I was unsure of is to pick them out of a temporarty...
with sscanf() if I want to pick up strings do I allow for the '\n'
i.e. if i want to pick up 2 strings of 20 characters & 15characters
would it be sscanf( string, "%20s%15s", string1, string2)...
How can I tell which motherboard I have without opening my computer up?
my mistake ther they are 20 and 60. I have allowed for them in the structure but just typed them wrong in the sscanf()
and long temp_balance;
but apart from that am I on the right track or is ther...
This is the structure as well, just in case it helps :
struct Record{
char Record_Type,
Customer_Code[6],
Customer_Address[21],
...
Looks fine, other than the possible problem with sscanf and your variables. If any of those are not character arrays, then you'll need to modify the call to use the address of said variable....
int make_fields( char *string_ptr, RECORD *data_ptr )
{
if( sscanf( string_ptr, "%c%5s%21s%61s%10s%8s",
&data_ptr->Cre.Record_Type,
...
I am not sure of how to do this as both the name and address may contain spaces i.e 123 street not 123_street or something like that. I dont want it to stop reading the data when it encounters a...
yes that is as I understand it
I dont think you can but you should have a gcc compiler on Linux that will do it for you.
I don't produce the data the college does so I cant incorporate anthing into the data. so the data must be stored in the file as 1character for type than 20 characters for the name ( i.e. if name is...
What's the delimiter between name and address?
It is part of my coursework and I have read through it and it doesn't say, I am assuming that if the name occupies less than 20 characters the rest...
I am not sure of the best wat to get my data from a file and convert it into it correct data type.
I have used fgets(); to get the line of data but I am not sure of the best way of converting it...
I have to write a program for part of my coursework project. The overall program is broken down in to 4 individual programs. All data must pass through each program in order i. prog1, prog2, prog3...
HI I am going away for a month in a week and was wondering if there is a way that I can access my PC from any PC whilst I am away and if so how do I do it. i.e. I want to work on another computer but...
Yes I have installed mandrake and redhat on my old computer
I have bought a new Packard bell Idesign and cant get it to install linux does anyone know of any reason why this is or how I could remedy it. I can't even get it to start partitioning so is ther...
Sorry I should of said that you need to include a specila header file to use toupper() :
#include <ctype.h>
and you can use to uppper as soon as you have the character ie.
scanf( ... ); /*...
when your checking the breed and the flag use == not =
i.e. while( flag == 'Y' )
you might also want to make sure there is no confusion between 'y' and 'Y' or 'n' and 'N' you can use toupper(...
Why can i not use my old programs on my new computer. I have just got a windows xp and I have tried to install Microsoft office 2000 on it that I use to use on my old computer. it installed o.k. but...
How do I try this msconfig ??:confused:
sorry forgot to mention its xp
Hi, Every time I switch my computer on it always try's to print a document. I cancel it and it still gets sent to the printer every time who ever I log on as how can I trace the program responsible...
I tried the disk on a compaq computer and it worked o.k. so the disks are fine. It must be my hardware how can I get round this.
Any Ideas