Pianorain: no need to apologise.
Pianorain: no need to apologise.
There are only a certain number of ASCII characters that can be printed, given any OS and any compiler that is based on ASCII.
There may be a certain subset more that can be printed, based soley on OS and compiler.
That was the output from the program below on a Windows 2003 Small Business Server OS using Microsoft Visual C++ Toolkit 2003.Code:☺ ☻ ♥ ♦ ♣ ♠ ♫ ☼ ► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ → ← ∟ ↔ ▲ ▼ ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ⌂
So no. Not every character in ASCII can be displayed on all implimentations.Code:#include <iostream> int main() { for (int x = 0; x < 128; x++) { std::cout << (char)x << "\t"; } std::cin.get(); return(0); }
totally lol .:P hmm dunno if this might help but this is my ASCII listing program I always use :Originally Posted by sufthingol
so whats the problem with just 95 characters being displayed?Code:#include <iostream> // says that we are going to use cout #include <conio.h> // used for getch(): #include <windows.h> // says were going to use some colours // allows us to use getch(); using namespace std; int main() { int y ; //-------------declares the colours were going to use -------------// HANDLE h = GetStdHandle ( STD_OUTPUT_HANDLE ); WORD wOldColorAttrs; CONSOLE_SCREEN_BUFFER_INFO csbiInfo; //--------------------generates the ASCII list--------------------// for ( int x = 0; x < 257; x++ ) { // declares x , adds 1 to x while x is smaller than 256 // SetConsoleTextAttribute ( h, FOREGROUND_BLUE | FOREGROUND_INTENSITY ); cout<< x <<".) " ; SetConsoleTextAttribute ( h, FOREGROUND_GREEN | FOREGROUND_INTENSITY ); cout << (char)x << endl ; // shows wich number corrospontents with the ASCII number // } // some copyright :P SetConsoleTextAttribute ( h, FOREGROUND_RED | FOREGROUND_INTENSITY ); cout << endl << "written by " ; SetConsoleTextAttribute ( h, FOREGROUND_BLUE | FOREGROUND_INTENSITY ); cout << "MystWind "<< (char)184 ; // (char)184 stands for nr. 184 in the ASCII listing ; copyright. getch(); // this doesn't closes the program until you press a key. }
I can;t compile your program though , because of the cursus libary
PLay MystWind beta , within two years
Did that ever strike you as needlessly complicated, Myst?
Apparently there is a video mode that let's you display those glyphs directly. A programmer known as Tim Sweeny did it in his dos program ZZT. I wish I knew how he did it. He was using Pascal btw.
Somehow ZZT made it onto the list of "Top 100 DOS Games". That better be why.
I can't say I know how this can be done without creating a font yourself and doing some manual rendering, or using some Windows API functionality (or other 3rd party libraries, like the curses one you're using perhaps). After all, there are characters that hold special functions such as '\0' (as has been mentioned), '\a', '\t', '\b', and all the other escape sequences as well. If you try outputting any of them, they will almost certainly not display single characters as you might expect.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
He also went on to help start Epic Megagames, now known simply as Epic Games, the makers if the Unreal Engine (and series).Originally Posted by sufthingol
If any part of my post is incorrect, please correct me.
This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.
I have found out how to do it.
http://img.photobucket.com/albums/v3...ic/charmap.jpgCode:int a = 0; do { addch(a | A_ALTCHARSET);refresh(); ++a; } while (a < 256);getch();
NO its NOT needlessly complicated : check the out put , its better than any other ASCII output listing programs.Originally Posted by Lithorien
p.s congratz suftingol
Last edited by MystWind; 03-10-2005 at 10:42 AM.
PLay MystWind beta , within two years