VC consloe
cout.put(65)//65 is the ASCII code of 'A'
error C2668: 'put' : ambiguous call to overloaded function
why?
Printable View
VC consloe
cout.put(65)//65 is the ASCII code of 'A'
error C2668: 'put' : ambiguous call to overloaded function
why?
Are you using
if so, that is non-standard ... use the standardCode:#include <iostream.h>
Code:#include <iostream>
thanks much! but when i useQuote:
Originally posted by Philip Nicoletti
Are you using
if so, that is non-standard ... use the standardCode:#include <iostream.h>
Code:#include <iostream>
#include <iostream>
cout became an undeclared identifier!
error C2065: 'cout' : undeclared identifier
the stream functions reside in namespace std,
so you need something like this:
or you can qualify cout as follows :Code:#include <iostream>
using namespace std; // add this line
int main()
{
cout.put(65);
return 0;
}
If you do a search on Andreas Masur posts, he has aCode:#include <iostream>
int main()
{
std::cout.put(65);
return 0;
}
good exaplanation on namespaces
here is a link on namsespace
http://www.codeguru.com/forum/showth...ight=namespace
thanks again! you have help me resolve the problem throughly
btw:
West Virginia an beautiful place I have known from
<take me home country roads > of John denver