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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:01:08+00:00 2026-05-13T16:01:08+00:00

So, I have a vector std::vector<std::string> lines. I fill this vector up, and can

  • 0

So, I have a vector

 std::vector<std::string> lines. 

I fill this vector up, and can access it like

 std::string temp = lines[0];

However, in the immediate window, both

 lines[0] - error:overloaded operator not found

and

 lines.at(0) - error:symbol is ambiguous

don’t work at all. Is there a trick to using the immediate window with c++. I’m mostly coming from a C# background, where everything works nicely (and I have intellisense in the Immediate Window). I wasn’t expecting C++ to be great, but I figured it would work for things besides ints. Can anyone tell me what I’m doing wrong? Thanks.

EDIT: I should be clear, nothing really works in the immediate window, this is just a simplified example

EDIT: I’m in debug mode

  • 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-13T16:01:09+00:00Added an answer on May 13, 2026 at 4:01 pm

    The immediate and watch windows don’t support overloaded operators. There is some support in there for printing standard containers as a whole in a sensible fashion (see, e.g., http://www.virtualdub.org/blog/pivot/entry.php?id=120), but this doesn’t extend to being able to use operator[] on them.

    Hopefully this will be improved in later revisions of the debugger, but for now, to look at the i’th element of a vector, try lines._Myfirst[i].

    (_Myfirst, in the standard libraries that come with VC++, happens to be the member variable in a std::vector that points to the first element of the sequence. So this is just examining a vector as if it were any other object. To work this out, I had to look at the headers… not very convenient, but hopefully this will help you. You can probably do something similar with the other containers, but you’ll have to look in the headers to work out how.)

    (By the way, if you’ve been working in C#, the C++ debugger will probably seem by comparison a bit less slick in general, and this is just one example of that. I get the impression there’s been much more work put into the CLR side.)

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

Sidebar

Ask A Question

Stats

  • Questions 291k
  • Answers 291k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is a a little complex, but it works (I… May 13, 2026 at 5:56 pm
  • Editorial Team
    Editorial Team added an answer function setSupervisor(sender) { var selectedOption = sender.getElementsByTagName("option")[sender.selectedIndex]; var sid =… May 13, 2026 at 5:56 pm
  • Editorial Team
    Editorial Team added an answer You generate two different dialogs, one doesn't open but has… May 13, 2026 at 5:56 pm

Related Questions

I have a vector that I want to insert into a set . This
I'm now creating a file transaction system (through FTP) using wxWidgets for the GUI
I have a std::vector<uint8_t> that contains strings at specific offsets. Here's a shortened dump:
I have a function of the form: void DoSomething(const boost::function<bool ()>& condition, other stuff);
I have a bunch of strings that I need to sort. I think a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.