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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:28:06+00:00 2026-06-12T20:28:06+00:00

I have to input a string into an unsigned short array. Here is my

  • 0

I have to input a string into an unsigned short array.

Here is my implementation:

unsigned short strFile [ 200 ] = {0};
cin >> strFile;

I have included the iostream.h header.

But I always get an error:

error C2678: binary ‘>>’ : no operator found which takes a left-hand operand of type ‘std::istream’

Anybody knows how should I solve this?

  • 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-12T20:28:07+00:00Added an answer on June 12, 2026 at 8:28 pm

    There is no kind of string that would be compatible with unsigned short[].

    There is normal string that is char [] (in C++ you should always keep it in string except for constants!) and wide string, that is wchar_t[] (in C++ you should always keep it in wstring). And C++11 adds char16_t and char32_t and their corresponding u16string and u32string.

    You can read normal string from normal input stream like cin. You can read wide string from wide input stream like wcin.

    wchar_t used to be typedef to unsigned short in C, but C++ requires it to be a separate type. ISO/IEC
    14882:2003 3.9.1/5:

    Type wchar_t is a distinct type whose values can represent distinct codes for all members of the largest extended character set specified among the supported locales (22.1.1).

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

Sidebar

Related Questions

I have a problem where I need to split an input string into possible
I have a string input from which I need to extract simple information, here
I am trying to input a string into a C# console app, have it
I have this input string(oid) : 1.2.3.4.5.66.77.88.99.10.52 I want group each number into 3
Suppose I have String input = 1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,0,4,0,0,0,4,0,3; I want to encode it into a
I have an input string as follows: thumb_634735515600845357tchayat_november_200612.jpg What I want to do is
I have an input string which is a directory address: Example: ProgramFiles/Micro/Telephone And I
I have an input string such as x=y|a=b|c=10 etc which gets converted to dynamic
I have a string input = "maybe (this is | that was) some ((nice
I have a string input that i do not know whether or not is

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.