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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:52:32+00:00 2026-05-29T03:52:32+00:00

#ifndef IMAGEDATA_H #define IMAGEDATA_H #include <iostream> #include <vector> class ImageData { public: std::string foo;

  • 0
#ifndef IMAGEDATA_H
#define IMAGEDATA_H

#include <iostream>
#include <vector>

class ImageData {
public:
    std::string foo;
    std::string bar;
private:
};

#endif

I have this class definition and I have another class which has one of this class as follows:

#ifndef UserImageCollection_H
#define UserImageCollection_H

#include <iostream>
#include <vector>
#include "ImageData.h"

class UserImageCollection
{
public:
    std::string uid;
    std::string guid;
    std::string data;
    std::string vector<ImageData> imageData;
private:
};

#endif

when i make the file, I get this error:

In file included from UserImageCollection.cc:1:
../../include/producer/UserImageCollection.h:12: error: expected `;' before '<' token
gmake: *** [UserImageCollection.o] Error 1

in my UserImageCollection.cc file there is only 1 line right now.

When i comment out

std::string vector<ImageData> imageData;

it compiles but i need it, how can i get it running?

  • 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-29T03:52:33+00:00Added an answer on May 29, 2026 at 3:52 am

    imageData cannot be both a std::string and std::vector<ImageData>.

    It must be:

    std::string imageData;
    

    or:

    std::vector<ImageData> imageData;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#ifndef MIGRATINGUSER_H #define MIGRATINGUSER_H #include <iostream> using namespace std; class MigratingUser { public: void
FILE #1 (foo.h): #ifndef FOO_H_ #define FOO_H_ #include baseclass.h #include bar.h class Bar; class
I have the following class #ifndef Container_H #define Container_H #include <iostream> using namespace std;
#ifndef SLIST_H #define SLIST_H #include llist.h using namespace std; class slist:public llist{ public: slist();
Given this code sample: complex.h : #ifndef COMPLEX_H #define COMPLEX_H #include <iostream> class Complex
I have a file GetL.hxx #ifndef GetL_included #define GetL_included #include <iostream> using namespace std;
I have a file GetL.hxx #ifndef GetL_included #define GetL_included #include <iostream> using namespace std;
These are my files: --------[ c.hpp ]-------- #ifndef _C #define _C #include<iostream> class C
#ifndef DELETE #define DELETE(var) delete var, var = NULL #endif using namespace std; class
#ifndef _ClientSocket_H_ #define _ClientSocket_H_ #include Includes.h #include LOGMSGs.h class cSocket { public: cSocket(); bool

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.