This error message indicates that the function 'find_book' is being called in your C++ code, but it hasn't been declared or defined anywhere within the scope of the code. The message also suggests a possible alternative function called 'add_book'.

To fix this error, you need to do one of the following:

  1. Declare and define the 'find_book' function: If 'find_book' is a function you intend to use, you need to declare and define it before calling it. Here's an example:
// Function declaration
void find_book(std::string book_title); 

// Function definition
void find_book(std::string book_title) {
  // Code to find the book
}

// ... Code that calls the find_book function
  1. Correct the function name to 'add_book': If the intended function to be called is 'add_book', simply change the function call to use 'add_book' instead of 'find_book'.

By following these steps, you should be able to resolve the 'find_book' not declared error and continue with your C++ code.

C++ Error: 'find_book' Not Declared - Fix and Explanation

原文地址: https://www.cveoy.top/t/topic/oEcm 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录