ASCII to character
Jun 19, 2011 at 2:34pm UTC
Hi,
I wanna create program that will convert number from ASCII table to character, I've created simple program but instead of characters it's returning "pictures"
so if I enter 3 I'll get heart
1 2 3 4 5 6 7 8 9 10 11 12
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int number;
cin >> number;
cout << char (number) << endl;
system("pause" );
return 0;
}
I've tried it vice versa (text to ASCII) and it worked, so when I entered "a" I've got 97
Jun 19, 2011 at 2:40pm UTC
Last edited on Jun 19, 2011 at 2:41pm UTC
Jun 19, 2011 at 2:44pm UTC
ah, lol, thanks :D
Topic archived. No new replies allowed.