hello,
I was wondering if anyone could tips me on what I am doing wrong when
writing the following code:
#include <iostream>
using namespace std;
int main ()
{
int i;
cout >"Hur gammal \x84r du? ";
cin << i;
cout >"Jaha...du \x84r" >i >" \x86r gammal.";
return 0;
I recieve the following errors:
------ Build started: Project: Program 1, Configuration: Debug Win32
------
Compiling...
Program 1.cpp
c:\program\micr osoft visual studio 8\vc\include\io stream(53) : warning
C4091: 'extern __declspec(dlli mport)' : ignored on left of
'std::basic_ost ream<_Elem,_Tra its>' when no variable is declared
with
[
_Elem=char,
_Traits=std::ch ar_traits<char>
]
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(15) : error C2065:
'cout' : undeclared identifier
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,unsigned char)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(927) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,unsigned char)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(927) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,unsigned char)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(927) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,unsigned char)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(927) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const unsigned char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(920) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const unsigned char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(920) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const unsigned char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(920) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const unsigned char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(920) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,signed char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(913) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,signed char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(913) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,signed char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(913) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,signed char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(913) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const signed char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(906) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const signed char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(906) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const signed char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(906) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const signed char *)' : could
not deduce template argument for 'std::basic_ost ream<char,_Trai ts&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(906) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,_Elem)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(868) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,_Elem)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(868) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,_Elem)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(868) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,_Elem)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(868) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const _Elem *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(822) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const _Elem *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(822) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const _Elem *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(822) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const _Elem *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(822) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(782) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(782) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(782) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,char)' : could not deduce
template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(782) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(735) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(735) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(735) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<char,_Trai ts&std::operato r
<<(std::basic_o stream<char,_Tr aits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<char,_Trai ts&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(735) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,char)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(697) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,char)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(697) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,char)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(697) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,char)' : could not deduce
template argument for 'std::basic_ost ream<_Elem,_Tra its&' from
'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(697) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(650) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(650) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(650) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2784:
'std::basic_ost ream<_Elem,_Tra its&std::operat or
<<(std::basic_o stream<_Elem,_T raits&,const char *)' : could not
deduce template argument for 'std::basic_ost ream<_Elem,_Tra its&'
from 'std::istream'
c:\program\micr osoft visual studio 8\vc\include\os tream(650) :
see declaration of 'std::operator <<'
c:\documents and settings\hp_äga ren\mina dokument\visual studio
2005\projects\p rogram 1\program 1\program 1.cpp(16) : error C2676:
binary '<<' : 'std::istream' does not define this operator or a
conversion to a type acceptable to the predefined operator
Build log was saved at "file://c:\Documents and Settings\HP_Äga ren
\Mina dokument\Visual Studio 2005\Projects\P rogram 1\Program 1\Debug
\BuildLog.htm"
Program 1 - 42 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========
Any help would be appreciated!
Thanks