I need to know how I could convert integers into character in C++. As in PASCAL, we do it like this:
var a:char;
begin
writeln(chr(65)); {This will print 'A'}
writeln(chr(66)); {This will print 'B'}
a=chr(67);
writeln(a); {This will print 'C'}
end.
My question is : How will I do this on C++? I need to know the function and library used.
Thanks a lot.
PASCAL - C++ Migration help?
#include (iostream.h)
void main()
{char a;
cout %26lt;%26lt; (char(65));\\This will print A
cout %26lt;%26lt; (char(66));\\This will print B
a=(char(67));
cout %26lt;%26lt; a;\\This will print C
}
song titles
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment