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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:54:43+00:00 2026-05-28T04:54:43+00:00

This is my header file: /** * Job.h * **/ #ifndef JOB_ #define JOB_

  • 0

This is my header file:

/**
 * Job.h
 *
 **/

#ifndef JOB_
#define JOB_

#include <map>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <vector>

class Job {

private:

int resourceId;
int inputRepresentation;
int outputRepresentation;

//Effects associative array
//Maps an effect to a map of it's attributes
//effectsMap[effect][attribute]=value
map< std::string, map<std::string, int> > *effectsMap;

public:

//constructors
Job();
Job(int resId, int inputRep, int outputRep);

//destructor
virtual ~Job();


//getters
int getInputRepresentation() const;
int getOutputRepresentation() const;
int getResourceId() const;


//setters
void setInputRepresentation(int inputRepresentation);
void setOutputRepresentation(int outputRepresentation);
void setResourceId(int resourceId);
void setRepresentations(std::map *rep);

void addEffect(std::string effect, map<std::string, int> attributesMap);



};


#endif

Now Ii will get to the point:

void setRepresentations(std::map *rep)

Gives the following error: “map is not a type”
This is weird because it looks like eclipse manages to properly link to the stl library…
And I do have a private field of map that seems to be fine.

Any ideas?

  • 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-05-28T04:54:44+00:00Added an answer on May 28, 2026 at 4:54 am

    You need to specify the full type of the map, including the types inside the < >: Something like:

    void setRepresentations(std::map<std::string, int> *rep);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting a compiler error with this header file: #ifndef GAME1_H #define GAME1_H #include
I have a header file like this: #ifndef __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #define __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #ifdef _DEBUG //
How can I add multiple implementations to this header file: MoveAgent.h #ifndef _GAMEAGENT_ #define
I have a header file. In this header I want to use a map
i coded a header file which includes some of tabs.this header file is include
I'm code reviewing a colleagues code and found this: Header file: template<class T> class
Have a look at this hypothetical header file: template <class T> class HungryHippo {
I have this header file, zeeheader.h, and I wrote some classes in it, I'm
I have a macro definition in header file like this: // header.h ARRAY_SZ(a) =
I have registered an enumeration type ClefType within my header file - this enum

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.