Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

an easy one - How to output infinum sign

Posted on 2002-05-30
9
Medium Priority
?
211 Views
Last Modified: 2010-04-02
How can I output, with cout, an infinum sign from ASCII table (num. 236) in MS Visual C++ / console application?

I was playing around with char(236), but no luck.. A different character table maybe?

TNX!

Jurij
0
Comment
Question by:jurij
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7044766
How about:

     char inf = 236;
     cout << inf << endl;

??
0
 

Author Comment

by:jurij
ID: 7045121
That's the same as using:
 cout << char(236) << endl;
and it does not work! I don't get an infinum sign.
I think problem is in the char table I'm using.. no infinum sign..
TNX anyway...
0
 
LVL 32

Expert Comment

by:jhance
ID: 7045226
I tried it myself and I got a infinity sign in the CMD window, just as you asked....
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 49

Accepted Solution

by:
DanRollins earned 800 total points
ID: 7045361
You may need to select a different default font for your console window.  This is done by clicking the icon in the top left corner and chosing properties.

-- Dan
0
 
LVL 1

Expert Comment

by:Shivshankar
ID: 7048442
Try printing "\236"... i.e. cout << "\236"
0
 
LVL 6

Expert Comment

by:Triskelion
ID: 7049921
One way to ensure your FONT or character set has the sign is to type it manually at the command prompt.

Hold down ALT, type 236 [ON THE KEYPAD only], release the ALT.  If it is some unexpected character, then DanRollins has it pegged.

If it works, try this code; it should also work.

#include <iostream>
using namespace std;

void main(void)
{
     printf("ì %c \xEC\n", 236);
     cout << "ì " << char(236) << " \xEC" << endl;
}
0
 

Author Comment

by:jurij
ID: 7051478
That's the problem!
I have a different character set (no infinum sign).
Can I "override" or re-set a different character set in my c++ program?
Thank you!
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7052225
In the Windows Explorer, right-click on your EXE and drag and rop it, choosing "Create Shortcut here"  Then right-click that and choose Properties and then set the font.

Or run the app, right-click the top-left corner, set properties set the font and indicate "Save properties for future windows with the same title"

There may be a way to set font for a console window programatically, but you probably only need that for a commerical product.  

-- Dan
0
 
LVL 11

Expert Comment

by:griessh
ID: 7260220
Dear jurii

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "DanRollins"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question