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

  • Home
  • SEARCH
  • 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 9218001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:45:42+00:00 2026-06-18T02:45:42+00:00

So I have this warehouse class: warehouse.h: #ifndef WAREHOUSE_H #define WAREHOUSE_H #include<string> #include<map> #include

  • 0

So I have this warehouse class:

warehouse.h:

#ifndef WAREHOUSE_H
#define WAREHOUSE_H
#include<string>
#include<map>
#include "dates.h"

namespace a4
{
 class warehouse
 {
    public:
        warehouse(std::string name, std::string start_date);

    private:
        std::string name;
        std::string busiest_day;
        int most_transactions;
        std::map<std::string, a4::food> items;
        dates current_date;
        void next_day();
 };
}
 #endif

warehouse.cc:

#include "warehouse.h"
#include "dates.h"
namespace a4
{
 //constructor
 warehouse::warehouse(std::string name, std::string start_date)
 {
     this->current_date = new dates(start_date);
 }
 void warehouse::next_day()
 {
     this->current_date.next_day();
 }
}

And the compiler error im getting is:

warehouse.cc: In constructor ‘a4::warehouse::warehouse(std::string, std::string)’:
warehouse.cc:8: error: ‘class a4::warehouse’ has no member named ‘current_date’
warehouse.cc: In member function ‘void a4::warehouse::next_day()’:
warehouse.cc:12: error: ‘class a4::warehouse’ has no member named ‘current_date’

Any idea why its not recognizing current_date as a member? It’s probably pretty simple but I’m only a few weeks into learning c++.

  • 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-18T02:45:43+00:00Added an answer on June 18, 2026 at 2:45 am

    The only possibility I can see is that this is not what your header looks like. Ensure that you’ve been editing the correct file in the correct directory.

    When you’ve fixed that, you’ll find that your next error is “cannot convert dates* to date“. This is because you’re using new where you should not be.

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

Sidebar

Related Questions

So here is my header: //warehouse.h #ifndef WAREHOUSE_H #define WAREHOUSE_H #include<string> #include<map> #include dates.h
I have the following code in mypage, .... <input type=checkbox title=Warehouse1 name=warehouse[] id=selectedUser_1 class=select_checkbox
I have have this query that i want to execute. SELECT warehouse.expiry_date, pharmacy.expiry_date, drugs.active_substance,
I have this string 2012-06-27 16:17:06 and I want to convert it to GMT
I have this form: <%= form_tag posts_path, :method => :get, :class => search_nav do
I have this code: SELECT rv_storage.m_product_id AS n_product_id, rv_storage.value, rv_storage.name, m_warehouse.name AS warehouse_name, rv_storage.qtyonhand,
I have a MySqlDataReader object, with the result of this query : SELECT warehouse,
I have this xml: <Documents> <Header Document_No=Numb1 Warehouse=WH2> <Body Position=1 Quantity=11 /> <Body Position=2
I have the following string cases: my $str = Warehouse.13.s01e01.hdtv.xor.avi; my $str = Warehouse.13.01x01.hdtv.xor.avi;
I have a database table called Warehouse this Warehouse's linked to a Product table

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.