>\" matches these operands" />
开发者

IntelliSense: no operator >> matches these operands

I am trying to figure out why I keep getting the compiler error

IntelliSense: no operator ">>" matches these operands

with the code below. Would appreciate any help given. Thanks

#include "stdafx.h"
#include <string>
#include <iostream>
using namespace std;

 int main(void)
 {
      int n;//number of resources we will  be dealing with 
 开发者_JAVA百科     cout <<"What is number of resources to be shared?"<<
      cin >> n;
      return 0;
 }


Hint:

cout <<"What is number of resources to be shared?"<<
cin >> n;

Is the same as:

cout <<"What is number of resources to be shared?"<< cin >> n;

Perhaps << should be followed by something like std::endl;, just or changed to a ;.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜