Re: a question about cin
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
Jefe wrote:
Tnx Ulrich for you reply but now I have another problem, my Visual Studio.Net
compiler says there is an error at "while (cin >>s)" line and it said that
"error C2679: binary '>>' : no operator found which takes a right-hand
operand of type 'std::string' (or there is no acceptable conversion)" what
should I do now????
You should make sure you are including the correct header files. As
Jochen indicated, you should have:
#include <string>
#include <iostream>
using namespace std;
If you were using
#include <iostream.h>
you need to get yourself a new book on C++.
HTH,
David Wilkinson
.
Relevant Pages
- Re: First steps on overloading
... where the operand manipulation code is located, ... very many additions and changes to the language semantics. ... Allowing int + date, as well as date + int (although the former seems a bit ... compiler would reorder the operands. ... (comp.lang.misc) - Re: First steps on overloading
... where the operand manipulation code is located, ... Allowing int + date, as well as date + int (although the former seems a bit ... compiler would reorder the operands. ... (comp.lang.misc) - Re: First steps on overloading
... where the operand manipulation code is located, ... Perhaps something like the pseudocode could be written by a programmer ... info on which the selections are made is available at compile time. ... with the compiler in the same form. ... (comp.lang.misc) - Re: [C, C++] "(a=b) = c;" Illegal or Undefined?
... What I am saying is that a compiler might look ... order of evaluation of the left and right operand is unspecified. ... occurs somewhere during the previous and next sequence point. ... assignment and 4 after assignment. ... (alt.comp.lang.learn.c-cpp) - Re: First steps on overloading
... where the operand manipulation code is located, ... Conventionally, I would imagine a 'date' type, and all the operations thereon, would be created by defining methods inside a class definition. ... So everything a compiler needs to know should be in there. ... However, with your example, the selection needed is straightforward: operand two is date, int, or other. ... (comp.lang.misc) |
|