473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to convert entered ascii value to float

Hi

any one help me in converting ascii value entered by user.

How to convert it to float basic of c programming techniques only

help me
Sep 29 '12 #1
2 3322
whodgson
542 512MB
char c='A';cout<<"c = "<<c;//prints 65
float x=c;cout<<"x = "<<x;//prints 65 (not 65.0)but x is a float
This is an example of promotion rather than conversion.
Sep 30 '12 #2
Banfa
9,065 Expert Mod 8TB
Look up the function strtof in the standard C library
Oct 1 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Steve Horsley | last post by:
How can I get the ASCII value of a character, e.g. I have: str = "A B" for index in range(0, len(str)): value = WHAT_GOES_HERE?(str) print value and I hope to get: 65
6
by: Haas | last post by:
Hello folks, I just started a C++ course. An exercise is to give the ASCII value of a character read from keyboard. I place the input from the keyboard in a char-variable. How can i get the...
7
by: Golan | last post by:
Hi, I need to convert a Binary value to Decimal. I've been told that the value is an unsigned one. How can I do this? I use memcpy into an unsigned char variable, but when I print the value I got...
2
by: questions | last post by:
How do I convert a number to its ascii value in c#? What is the equivalent of VB's chr() function in c#? thanks in advance
3
by: Joshua Russell | last post by:
Hi, Can anyone tell me how I can convert an Intager value such as '66' into the letter 'f' (using ANSI ASCII). Thanx Josh
1
by: James Dean | last post by:
i want to be able to get the correct ascii value from a byte without having to use the Convert.ToChar function as a char takes up two bytes of space and it is affecting the performance of my...
2
by: Microsoft News | last post by:
Hoe to calculate ASCII value of a character
3
by: Wayne Wengert | last post by:
I want to pass the ASCII value of a keystroke to a sub that checks for valid characters (see sample below). I have looked through the possible choices for "values" of the e.KeyChar but I can't find...
2
saranjegan
by: saranjegan | last post by:
Dudes, this is my doubt i need to rename a file,i can make it thru rename function..but the modified name should be an original name added with ascii value of 23.. these are questions...
6
by: ssetz | last post by:
Hello, For work, I need to write a password filter. The problem is that my C+ + experience is only some practice in school, 10 years ago. I now develop in C# which is completely different to me....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.