I realize this is after the fact, and I'm not trying to be particularly mean, but I always have to laugh when I see stuff like this.
96 errors! probably because of std. |
It's the first class I'm writing & now I got 96 errors!
I think there should be something wrong with std. |
Yes, I'm sure that something that has been tested and used by hundreds of thousands of competent programmers is causing your 96 errors. Just like blaming the tennis racket when you miss the ball. Or the keyboard when you frob the wrong keys.
Perhaps you ought to learn and practice more before blaming the tools for your mistakes?
Almost all of the errors are "error C2784". |
Microsoft says that's because you screwed up your template arguments. For example:
c:\users\hp\documents\visual studio 2008\projects\account\account\3-1.cpp(17) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::getline(std::basic_istream<_Elem,_Traits> &,std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'std::basic_string<_Elem,_Traits,_Alloc> &' from 'char' |
This means that you confused the compiler when you tried to treat a
char as a
std::
string.
Moschops wrote: |
---|
Also, it's just plain wrong and if your compiler didn't even warn you, delete your compiler and get a better one. There are good, free compilers available. |
Ehsan Imani wrote: |
---|
Isn't Microsoft Visual C++ trusted? |
Framework wrote: |
---|
Yes, Microsoft is trustworthy; they just like to be different, as always. |
CodeMonkey wrote: |
---|
Yes it is, the case is being overstated. I believe that all compilers work in a non-standard mode (extensions) and have to be told to only use standard c++ via switches. |
Microsoft makes one of the finest C++ compilers available, that even Stroustrup likes. Oh, and they also have a free version. But wait! The OP is already using a better version than the free one!
As
CodeMonkey said, all compilers have their preferred modes of operation. Every one needs to be told to check the code as strictly as possible (or required): turn on all warnings and errors when compiling.