Nevermind, I solved the issue.
Type: Posts; User: ntomaski
Nevermind, I solved the issue.
I'm having some difficulty scanning the integer from a text file which looks like this:
7 //this is the size of the array of structures
Coca Cola
.75
2
Root Beer
.75
5
Grape Soda
.80
Yeah it looked really ugly, but it worked. Your code looks much more pleasant on the eyes.
Unfortunately, I can't get your code to display accurately. It's spewing out garbage results. I tried...
I'm working on an assignment where my program acts as a vending machine and everytime a user runs and makes a "purchase", the program will return and write the new data back into the file called...
I solved it. The output displayed correctly. Thank you very much for the help.
The default text editor on mac only has the option to save as a rich text format (very stupid), I then converted the...
Okay, I corrected my errors, but it still seems to output extraordinary data.
My revised main function looks like this:
int ch;
int space_count = 0, con_count = 0, digit_count = 0,...
So I have a text file which reads: This line has numbers: 1, 2,3, 4, 55 Some lines include punctuations such as , ; . / & ^
My output is displaying drastic results:
Number of vowels: 0
Number...
So I'm getting this error on XCODE where the program reads the file.
Here's my main function:
int main (void)
{
int emp_number , status , count = 0;