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 7918249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:26:25+00:00 2026-06-03T15:26:25+00:00

I have implemented Customer, DVD, Receipt, classes and 2 files for main functions and

  • 0

I have implemented Customer, DVD, Receipt, classes and 2 files for main functions and menu functions, I included all the .h files, but when I use a function for example from the menu functions, it doesnt work, and says the functions isnt defined. I want to write the in a seperate .cpp file which is called main that is the driver of my application.

Here is my code:

#ifndef CUSTOMER_H
#include "Customer.h"
#endif

#ifndef DVD_H
#include "DVD.h"
#endif

#ifndef MAIN_FUNC_H
#include "MainFunctions.h"
#endif

#ifndef MENU_FUNC_H
#include "MenuFunctions.h"
#endif

#ifndef RECEIPT_H
#include "Receipt.h"
#endif

using namespace std;

int main () {
    intro();

    return 0;
}

and the error is:

Error 1 error C2129: static function ‘void intro(void)’ declared but
not defined c:\program files (x86)\microsoft visual studio
10.0\vc\include\xmemory 186 1 DVD_App

even though the function intro() is defined in the MenuFunctions.h file, and implemented in MenuFunctions.cpp

NOTE: The 2 files, MenuFunctions and MainFunctions dont have classes in them, just static functions
I also tried it without the include guards, and again didnt work

  • 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-03T15:26:28+00:00Added an answer on June 3, 2026 at 3:26 pm

    If you mark function with static (note – function, not method), it is meant to be ‘local’ for the compilation unit (.cpp file). So it needs to be declared AND defined there, and is not visible from other cpp files. So, removing static means, that the function can be accessed across compilation units.

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

Sidebar

Related Questions

All, I have Core Data implemented in my program to store customer information. Let's
we have implemented a web application in asp.net 4.0 and customer needs us to
I have EF 4 implemented in the project. Within it, there are tables customer
On my new customer page , I have successfully implemented a jQuery show/hide toggle
I have this function implemented for parsing employee details, similarly i will have to
I have implemented the A* algorithm in AS3 and it works great except for
I have implemented Facebook Connect into a HTML page exactly as the tutorial explains
I have implemented a VSS requester, and it links compiles and executes on Windows
I have implemented a ToString() override method for my class in my Webservice and
I have implemented a sort of Repository class and it has has GetByID ,

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.