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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:28:38+00:00 2026-06-10T18:28:38+00:00

C2143: syntax error : missing ‘;’ before ‘<‘ I might be quite rusty in

  • 0

C2143: syntax error : missing ‘;’ before ‘<‘

I might be quite rusty in C++ since I sincerely don’t know the reason of such errors.
The code is actually quite simple. (VS2003)

#include <vector>

class store
{
public:
    vector<int>storage;
};

int _tmain(int argc, _TCHAR* argv[])
{
    return 0;
}
  • 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-10T18:28:40+00:00Added an answer on June 10, 2026 at 6:28 pm

    Because you need to add std:: in front of vector:

    std::vector<int>storage;
    

    The vector class is inside the std namespace.


    Or just add

    using namespace std;
    

    which is highly NOT recommended, especially for header files.

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

Sidebar

Related Questions

relating to Vector<ElemType>::Vector(int capacity) C2143: syntax error : missing ';' before '<' C4430: missing
I'm getting this compilation error with the following code: error C2143: syntax error :
I don't know whats wrong with the code, but keep getting these error messages
Does anyone see any syntax error on the following line? int a6[3][2]={{0,0},{0,0},{0,0}}; for (int
i wana create a bst tree in c++ but i have a syntax error
I know this question has been asked and answered before, but none of the
Error 3 error C2059: syntax error : ')' c:\program files\microsoft visual studio 10.0\vc\include\string 758
I have some errors in my header file, which I don't know how to
I am getting a very confusing compiler error when building the following test code.
What's wrong in this: i'm getting these errors for all the 5 definitions: error

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.