473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Continue statement not within loop?

First of all, it's my first time here.
Also, i'm working on a simple rent management program for a school project. I've fixed most of the errors but i'm lost on what could be wrong here:

error: continue statement not within a loop

Expand|Select|Wrap|Line Numbers
  1. while(fscanf(records,"%s %s %s %s %d %d %d %d %d %d", idNumber, familyName, firstName, bookCode, &dateIn.month, &dateIn.day, &dateIn.year, &dateOut.month, &dateOut.day, &dateOut.year)!=EOF);
  2.                              {
  3.                                    reply='n';
  4.                                    if (stricmp(idNumber,idCheck)==0)
  5.                                       {
  6.                                            printf("Will you check in this?: ID#: %s\nName: %s, %s\nBook Code: %s borrowed on %d/%d/%d Due: %d/%d/%d(y/n)?\n",idNumber,
  7.                                            familyName,firstName,bookCode,dateIn.month,dateIn.day,dateIn.year);
  8.                                            if (dateToday.year>dateOut.year){
  9.                                               printf("THE BOOK IS OVERDUE.");}
  10.                                            else if ((dateToday.year>=dateOut.year) && (dateToday.month>dateOut.month)){
  11.                                                 printf("THE BOOK IS OVERDUE.");}
  12.                                            else if (((dateToday.year>=dateOut.year) && (dateToday.month>=dateOut.month)) && (dateToday.day>dateOut.day)){
  13.                                                 printf("THE BOOK IS OVERDUE.");}
  14.                                            scanf("%c", reply);
  15.                                       }
  16.                                    if ((reply=='y') || reply=='Y')
  17.                                               continue;
  18.                                    fprintf(temp,"%s %s %s %s %d %d %d %d %d %d", idNumber, familyName, firstName, bookCode, dateIn.month, dateIn.day, dateIn.year, dateOut.month, dateOut.day, dateOut.year);
  19.                              }
  20.  
Mar 4 '11 #1

✓ answered by jjdot

remove the semi-colon at the end of first line
Expand|Select|Wrap|Line Numbers
  1. while(fscanf(records,...

3 12167
Banfa
9,065 Expert Mod 8TB
You have a ; at the end of the while line 1.
Mar 4 '11 #2
jjdot
11
remove the semi-colon at the end of first line
Expand|Select|Wrap|Line Numbers
  1. while(fscanf(records,...
Mar 4 '11 #3
Really? Wow, i didn't notice that. I'm a bit new to this though.
Mar 4 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: John Morgan | last post by:
In a 'Top n' type statement I wish to be able to insert the n value from a parameter, within a stored precedure eg Having declared @pageSize as a parameter I want to run the following type of...
30
by: Mark | last post by:
I am a complete novice with php scrip but I am wiling to learn. I am in need of some help, please. Can anyone sort this code out for me so that it works correctly and adjusts the price for the...
15
by: PagCal | last post by:
Is this language missing the functionality of a C/C++ 'continue' statement? For example: While NOT isEof() If condition ' a C or C++ continue would work here ' but we are forced to use a...
1
by: alisbub | last post by:
DOes anyone know how to get the answer to this?? Please Help me. A simple way to to test the effect of a continue statement in the body of a for loop. What is printed? for (putchar( ' 1 ' );...
6
by: shiniskumar | last post by:
b1: if(){ sstmts; continue b1; }
10
by: BevG | last post by:
I would like to test a condition (using "if") on each recurrence of a while loop, but once the condition has been fulfilled the first time, it is bypassed for the rest of the while loop. eg. ...
5
by: AnDyG | last post by:
Hi everyone, i have a php script that echoes the following code from an if statement, what i need to do is make part of this only show if ($cat=="fireplaces.php"). Does anybody have any...
20
by: Constantine AI | last post by:
Hi I have this code which i thought was perfect maybe a bit of a mess but it works. The only problem is that the rst!PONo does not look at the table properly and generate a continuing number, which i...
2
by: ianmcdonagh | last post by:
Hi folks, I'm looking to pick everyone's brains. I have a cursor, with over 200 columns in the select. I am using a case in one of the columns which I'm retrieving, and want to issue an...
9
by: 16800960 | last post by:
Here is the code for my program // Book Price (16800960) #include <iostream> #include <string> #include <iomanip> const int MAXSIZE 300;
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.