473,396 Members | 1,789 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.

what are the reverse functions of atof( ), atoi( ) and atol( ) ?

hi all

what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string
thx!
Nov 13 '05 #1
4 20140
"Sharon" <sh************@hotmail.com> wrote:
hi all

what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string
thx!


Look up sprintf in your reference manual.

HTH
Regards
--
Irrwahn
(ir*******@freenet.de)
Nov 13 '05 #2
Sharon wrote:
what are the reverse functions of atof( ), atoi( ) and atol( ) ?


http://www.eskimo.com/~scs/C-faq/q13.1.html

Nov 13 '05 #3
Sharon wrote:
hi all

what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string


sprintf.
For the hundredth time.
Didn't you guess that you are not the first person to ask this? That this
might even be a Frequently Asked Question? What does that suggest to you?

--
Martin Ambuhl

Nov 13 '05 #4
Sharon wrote:

what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string


How about:

char whatzit[] = "sth";

and, in place of atof, atoi, atol consider using strtol, strtod,
etc. The inverse operations are usually performed by sprintf.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: steven | last post by:
Hi, I'm new to python. Given a class, how can I get know what attributes/functins in it without dig into the source? - narke
5
by: alex goldman | last post by:
When compiling this code with g++ -Wall -pedantic -ansi -c program.cpp # this is GCC-3.3.4 ###################################### #include <vector> class b { public: virtual void f() = 0;...
15
by: Anonymousgoogledeja | last post by:
Hi all, since the function atof, atoi, _atoi64, atol returned value are Return Values Each function returns the double, int, __int64 or long value produced by interpreting the input...
47
by: sudharsan | last post by:
Hi could you please explain wat atoi( ) function is for and an example how to use it?
3
by: Sunil Varma | last post by:
Hi, Can you give me the list of functions that are supplied by the compiler in a class? To my knowledge the following are supplied, Default Constructor, Copy Constructor, Destructor,
3
by: pauldepstein | last post by:
The following description of atoi is pasted from cplusplus.com. My question is after the pasting. ***** PASTING BEGINS HERE ****** int atoi ( const char * str ); <cstdlib> Convert string...
50
by: Bill Cunningham | last post by:
I have just read atoi() returns no errors. It returns an int though and the value of the int is supposed to be the value of the conversion. It seems to me that right there tells you if there was...
2
by: jcl43 | last post by:
def swime(lst): p = lst S = B = for x in lst: if x < p: S.append(x) else: B.append(x) return S + swerve(B)
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.