ASCII characters

I'm fairly new to C++ and have written a fairly basic program. I am struggling to get ASCII symbols to appear when i run my program.
For example instead of writing degrees, i would like to use the degrees symbol. I'm using visual studio 2010 express. The line of code in question is:

printf("\n\nThe lowest oven temperature is %d degrees",lowesttemp);

How would i replace the word degrees with the symbol? I know the ASCII code is 0248.
Try these
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
using namespace std;

int main()
{
	int lowesttemp = 5;
	int temp = 248;
	printf("\n\nThe lowest oven temperature is %d%c",lowesttemp, temp);
	cout << endl;
	cout << "or" << endl;
	printf("The lowest oven temperature is %d\370",lowesttemp);
	cin.ignore();
	return 0;
}
Awesome. That's really helped. Thank you
Specify the character in hexadecimal like this: "\xNN" where NN represents the two-digit hexadecimal value. 248 decimal is F8 in hex.

printf("\n\nThe lowest oven temperature is %d\xF8 ",lowesttemp);
Thank you. That's great.
Topic archived. No new replies allowed.