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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:36:01+00:00 2026-05-29T13:36:01+00:00

Here I have a basic example from a pdf on STL. Why doesn’t it

  • 0

Here I have a basic example from a pdf on STL.
Why doesn’t it work?

#include "stdafx.h"
#include <vector>
#include <algorithm>
#include <iostream>
#include <iterator>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
    vector<string> coll;
    copy(istream_iterator<string>(cin), //start of source
            istream_iterator<string>(), //end of source
            back_inserter(coll));
    return 0;
}

errors:

ClCompile:   All outputs are up-to-date.
stl_testing1.cpp
c:\program files\microsoft visual studio 10.0\vc\include\iterator(470): error C2678: binary '>>' :
no operator found which takes a left-hand operand of type 'std::basic_istream<_Elem,_Traits>' (or there is no acceptable conversion)
          with
          [
              _Elem=char,
              _Traits=std::char_traits<char>
          ]
          c:\program files\microsoft visual studio 10.0\vc\include\istream(1053): could be 'std::basic_istream<_Elem,_Traits> &std::operator
>><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &&,signed char *)'
          with
          [
              _Elem=char,
              _Traits=std::char_traits<char>
          ]
          c:\program files\microsoft visual studio 10.0\vc\include\istream(1060): or       'std::basic_istream<_Elem,_Traits> &std::operator
>><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &&,signed char &)'
          with
          [
              _Elem=char,
              _Traits=std::char_traits<char>
          ]
          c:\program files\microsoft visual studio 10.0\vc\include\istream(1067): or       'std::basic_istream<_Elem,_Traits> &std::operator
>><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &&,unsigned char *)'
          with

I wonder what is wrong. This is a Win32 console application.

  • 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-29T13:36:02+00:00Added an answer on May 29, 2026 at 1:36 pm
    #include <string>
    

    This might help.

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

Sidebar

Related Questions

We have a Union Query. Here's a basic (similar) example: SELECT a.Name, b.Info FROM
I have an extremely basic example of this here . To replicate, try submitting
This is a very basic question...quite embarassing, but here goes: I have a Stopwatch
Well, I think I have a very basic doubt here: I'm developing an app
I'm using the basic example from php.net on my local machine (Macbook Pro w/
I'm trying to implement this basic example found here : under the section titled
Here is a very basic example of what I want to do. The code
I have been trying to get a basic example of a servlet endpoint to
I'm trying to get the YAWS websocket example from here running on my local.
I'm trying to implement the Basic example for the GwtUpload library, as found here

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.