I want to how to use a character that isn't on the keyboard in the out put of my program. I've gone into eudcedit.exe to create characters that I want to use in my program and saced them under the font that I use for output, but what I want to know is how do I access these characters for output.

ex.

instead of having to output

cout << " /| \n";
cout << " || \n";
cout << " || \n";
cout << " || \n";
cout << " || \n";
cout << " || \n";
cout << " || \n";
cout << " || \n";
cout << " || \n";
cout << "---- \n";
cout << " || \n";
cout << " || \n";
cout << " --\n\n";

for a sword, I would like to output a single character that I've made, to symbolize a sword.

If I didn't explain this well enough please just ask. ^_^ Thanks for any help! ^_^

Find out the integer value of the character in your character set and you can use the hexadecimal or octal escape characters:

#include <iostream>

int main()
{
    std::cout<<"A == \x41, A == \101\n";
}

I don't think I understand. In the example you show are you showing how to find the integer of the character A?

If A is the letter that you are finding the integer of then how am I suppose to find the interger for a character that I can't input?

I huess you misunderstood Narue. Narue was just giving an example. I think this is something you are looking for:

for(i=0;i<256;i++)
{
    cout<<i<<'\t'<<(char)i<<endl;
}

It displays the entire ASCII character set.

> and saced them under the font that I use for output
Guessing "saced" is saved, then the first thing you need to do is select that font as your output font.
Having selected the font, you then need to output the correct character code which matches the saved position in the font.

Is this a console program, or a GUI program?

Put your code down here,maybe someone will exact
know what are you doing.

>Is this a console program, or a GUI program?

I think it's a console program.

I don't have any code trying to show this yet because everytime I copy and past the character into a "cout" statement it just shows up as a questionmark.

hi,
you have to try the way narue explained....... and to get the integer value of the charecter you can even use the function " int val=toascii(char)".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.