I did try it and I did write it in my code and it did work except for the jumping lines which i tried to fix but to no avail. It's not that I can't do this alone because i can but I'm strapped for...
Type: Posts; User: arti
I did try it and I did write it in my code and it did work except for the jumping lines which i tried to fix but to no avail. It's not that I can't do this alone because i can but I'm strapped for...
And the city and state are on the same line but nothing printed to the screen. I've copied the main code to another directory to test all the different codes i can use and each one is failing me, for...
It didn't work because the city and state didn't print
12748
#define MAXLINE 250
char line3[MAXLINE];
fgets(line3, MAXLINE, inputFILE);
gets(line3);
this didn't work....the command line didn't even show up
Ahh okay but I have tried to use fgets other times and it doesn't print to the screen; I have seen it done by fprintf and printf and other forums it has been suggested i use fputs or puts, but none...
12747
This is an updated code that gets the city and state and zip code. I'm doinv everything that I did but now it isn't working
/* Program: Assign2c
Course: CISP360
Author:...
I want to read from the file then print to the screen the city and the state "New Corio, New Mexico"; however, I can't store the city or the state in a single variable?
My variables for those two...
Thank you Kurt!!
I found out the problem. See I was hard coding "check no" but i was also putting "check no" in the file so it was only picking that up. I don't know how I could have missed that.
#define...
This is what i currently have in my code. I have provided the output
/* Program: Assign2c
Course: CISP360
Author: Arturo
Purpose: Payroll Program
Date: 03/20/13
Will do Matticus. Sorry for responding late...just got online
#define CHECK "************************************************************\n"
#define CHECKBORDER "* Check No. %3d *\n"
#define CHECKFORMAT ...
True. Sorry about that. I'm getting desperate. I used fscanf and fprintf before posting here and it worked fine....since now I have to format the check with stars it is not working:
* ...
I used fscanf and fprintf before and it worked but now it isn't. I'm currently using it and it's not working. I also USED the getline function but that's not working at all either.
I'm reading ffrom the file check.data which then is supposed to print to the screen the name Sabre Corporation which is in the file. I fscanf then I fprintf so i could read then print but it's not...
Thank you for your advice. Here is the code that I'm having problems with. I followed the code that my tutor suggested i use and it is printing out garbage.
12743
#include<stdio.h>...
I am not wasting your time! This snippet of the code is from a bigger part of code which I have to take out so I don't have to post my entire code on the thread, which upon viewing what i posted i...
And another problem.
I'm reading from the txt file that says
Check NO.
Sabre Corporation
15790 West Henness Lane
New Corio, New Mexico...
Okay i found out what was happening....Thank you all for helping me! It is so much appreciated!
I thought it wasn't supposed to print 0 if you only initialize it. Also, won't that create a problem in the future for me because the number that is supposed to go in there is 100 then increment to...
I didn't get that warning, but at first it printed 2 then I thought it was because i hadn't initialized it so I did then it printed 0 after i initialized it to 0.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
void printReport( FILE **inputFILE);
#define CHECK "************************************************************\n"
#define...
Okay I believe that this would be the shortest code that would compile.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
void printReport( FILE **inputFILE);
#define CHECK ...
int number=0;
The two was showing up before I initialized the variable number. See I thought the problem was that i was not initialzing the variable number that corresponds to number that is being...
They are defines that make up the description and formatting of the check I am supposed to write with my program