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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:45:57+00:00 2026-06-16T18:45:57+00:00

I am actually trying to implement a simulation of Paging, in my memory manager,

  • 0

I am actually trying to implement a simulation of Paging, in my memory manager, i tried create a static page table, but its giving reference error when i try to print it.

#ifndef MEMORYMANAGER_H
#define MEMORYMANAGER_H
#include "memory.h"

class MemoryManager
{
    private:
        PhysicalMemory RAM;
        LogicalMemory VM;
        int offsetValue;
        static int ** pageTable;
    public:
        MemoryManager();
        bool addProcess(TimeSliceRequest);
        void printVirtualMemory();
        /*
         * Page Table Initialization
         **/
        static void initializePageTable(){
            pageTable = new int * [pageSize];
            for (int i=0; i<pageSize; i++) {
                pageTable[i] = new int [2];
            }
        }
        static int getPageTabe(int x, int y) {
            return MemoryManager::pageTable[x][y]; // undefined reference to `MemoryManager::pageTable'
        }
        static void printPageTable(){
            for(int i=0; i<pageSize; i++){
                for(int j=0; j<2; j++) {
                    cout << getPageTabe(i,j);
                }
                cout << endl;
            }
        }
};


#endif // MEMORYMANAGER_H

Getting this Error from a long long time, please help

  • 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-16T18:45:58+00:00Added an answer on June 16, 2026 at 6:45 pm

    You only declare the pageTable member variable, you have to define it as well. This is done by basically repeating the declaration in an implementation (source) file:

    int ** MemoryManager::pageTable;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to implement sticky footer but its not working as planned. It throws it
Actually i am trying to implement the code on the following website http://www.mathworks.com/matlabcentral/fileexchange/28300 but
Actually I'm trying to implement an ontouchlistener into my android (1.5) application. therefore i
I am new to android..Actually iam trying to increase the RAM Memory of android
I'm trying to implement the danvk draggable table Javascript, and while I've been successful
I'm trying to implement a simple basic, but I'm afraid the operation of Bison
Trying to implement clean URLs (without .form, .do, etc.) with Spring MVC 3.0 (actually
Has anyone worked with the iAd framework? Actually, I am trying to implement Location
I am trying to create a truth table for the function F=(A&B) XOR (C&D').
I'm trying to implement a way to actually logout from my application that is

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.