Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:12:39+00:00 2026-06-18T00:12:39+00:00

ISBN.h int isValid(const char str[]); int isRegistered(FILE* fp, const char str[], char area[], char

  • 0

ISBN.h

int isValid(const char str[]);
int isRegistered(FILE* fp, const char str[], char area[], char publisher[], char title[]); 

error:

ISBN.h:2:18: error: FILE was not declared in this scope
ISBN.h:2:24: error: fp was not declared in this scope
ISBN.h:2:28: error: expected primary-expression before const
ISBN.h:2:46: error: expected primary-expression before char
ISBN.h:2:59: error: expected primary-expression before char
ISBN.h:2:77: error: expected primary-expression before char
ISBN.h:2:89: error: expression list treated as compound expression in initializer [-fpermissive]   

Not sure I understand the error as I have another header file with the same sort of parameters that doesn’t yield any errors:

ISBNPrefix.h

FILE* open(const char filename[]);
int isRegistered(FILE* fp, int area);
int minNoDigits(FILE* fp, int area);
int isRegistered(FILE* fp, int area, const char publisher[]);
int close(FILE* fp);
  1. These function prototypes are given to us by our professor.
  2. isRegistered is defined three times but with a different amount of paramaters, so when you use the function in main with X amount of parameters, will it just use the corresponding version with said parameters?
  3. I get a second set of errors corresponding to my ISBN.cpp which includes my ISBN.h:

    ISBN.cpp: In function int isRegistered(FILE*, const char*, char*, char*, char*):
    ISBN.cpp:36:89: error: int isRegistered(FILE*, const char*, char*, char*, char*) redeclared as different kind of symbol
    ISBN.h:2:5: error: previous declaration of int isRegistered

ISBN.cpp

#include "ISBN.h"
#include <cstring>
#include <iostream>
#include <cstdio>
using namespace std;

int isValid(const char str[])
{

}

int isRegistered(FILE* fp, const char str[], char area[], char publisher[], char title[])
{

} 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:12:40+00:00Added an answer on June 18, 2026 at 12:12 am

    FILE is part of the <cstdio> header, which is not included before you start using it in your header. It’s just like how you have to #include <iostream> to use std::cout. You should generally include every header you need on a per-file basis and not rely on other files to include them for you.

    Another thing to note is that you should usually deal with the first listed error before others. One error can cause a chain reaction of nonsensical errors and end up putting you off track very easily.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ISBN.cpp:8: error: 'ISBN' has not been declared ISBN.cpp:8: error: ISO C++ forbids declaration of
Suppose I have my models set up already. class books(models.Model): title = models.CharField... ISBN
I have a text file text_isbn with loads of ISBN in it. I want
The title is self explanatory. For some reason in the loop in int main(),
I have a book class that takes title, author, copyright, ISBN number, and checkout
I keep getting this error about my sql database NEW ERROR 07-03 01:52:08.037: ERROR/AndroidRuntime(627):
This is not homework, I don't have money for school so I am teaching
I have a database setup like `id` int(11) unsigned NOT NULL auto_increment, `ad-id` int(11)
class Book { public int ISBN { get; set; } } void Method() {
This code verifies whether an ISBN is valid. For nine-digit inputs, I'd like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.