Home > Back-end >  C, every brother novice small white for help!!!!!! Iostream suddenly can't use? !
C, every brother novice small white for help!!!!!! Iostream suddenly can't use? !

Time:02-25

Known as c + + can through iostream cout and cin or through cstdio (stdio. H) printf () and the scanf () for input and output, but when using the iostream recently, there is a problem, a small test code is as follows:

 
# include & lt; Iostream>//an error problem is out of here, import the iostream times of wrong, because the next line setting a breakpoint or wrong, so that's the problem here
using namespace std;
Int main ()
{
Int number;
Cout<& lt;" Both Please input a number: "& lt; Cin> Number;
Cout<& lt;" You had inputted "& lt; return 0;
}


After the operation error  , also opened another program, should be the inside of the iostream, my c + + compiler (DevC++) said that there is a fault, error section is as follows:

 
Template<>
The class allocator
{
Public:
Typedef size_t size_type;
Typedef ptrdiff_t difference_type;
Typedef void * pointer;
Typedef const void * const_pointer;
Typedef void value_type.

TemplateStruct the rebind
{typedef allocator<_Tp1 & gt; The other; };
};

/* *
* @ brief The @ a standard allocator, as per [20.4].
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html
* for further details.
*/
TemplateThe class allocator: public __glibcxx_base_allocator & lt; The _Tp & gt;//an error here, said it expected '{' before' & lt; 'token
{
Public:
Typedef size_t size_type;
Typedef ptrdiff_t difference_type;
Typedef _Tp * pointer;
Typedef const _Tp * const_pointer;
Typedef _Tp & amp; The reference;
Typedef const _Tp & amp; Const_reference;
Typedef _Tp value_type.

TemplateStruct the rebind
{typedef allocator<_Tp1 & gt; The other; };

Allocator () throw () {}

The allocator (const allocator& __a) throw ()
: __glibcxx_base_allocator & lt; The _Tp & gt; (__a) {}

TemplateThe allocator (const allocator<_Tp1 & gt; & amp;) Throw () {}

~ allocator () throw () {}

//Inherit everything else.
};


I just wonder, iostream library also can be wrong???????  later tests found that iomanip library also not line, are the problems of the above procedures, and the same problem,

I doubt my Dev - c + + version problem, version don't remember, I used, may be a few 5.2, now update to 5.11 a, turn your bosses, there is something wrong with here?

Help you bosses!!!!!! Hope to answer, thank!!!!!!