473,320 Members | 1,958 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,320 software developers and data experts.

convert int to char

Does anyone have a function or procedure for converting integers to
character strings?

Thank you,
John
Nov 14 '05 #1
30 8577
John Carroll wrote:
Does anyone have a function or procedure for converting integers to
character strings?


Didn't you think this would probably be a common question? If not, then
you think you've stumbled onto unexplored territory, even though C has
been in use for a quarter century. That seems unlikely, especially for
such a common thing to do, doesn't it? So a rational person would check
the FAQ, wouldn't he? <http://www.eskimo.com/~scs/C-faq/q13.1.html>
Nov 14 '05 #2
John Carroll wrote:
Does anyone have a function or procedure for converting integers to
character strings?

sprintf() (or better, if you have a [somewhat] C99 compatible
compiler/library, snprintf().

But please, *get a book!!!!!*

HTH,
--ag
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
Nov 14 '05 #3
itoa()
printf()
sprintf()

John Carroll wrote:
Does anyone have a function or procedure for converting integers to
character strings?

Thank you,
John


Nov 14 '05 #4
Neil Kurzman wrote:
John Carroll wrote:

Does anyone have a function or procedure for converting integers to
character strings?

Thank you,
John

[top posting orrected]
itoa()
No such thing.
printf()
Nope.
sprintf()
Yup!

HTH,
--ag
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
Nov 14 '05 #5
In article <3b*************@individual.net>,
Artie Gold <ar*******@austin.rr.com> wrote:
Neil Kurzman wrote:
John Carroll wrote:
Does anyone have a function or procedure for converting integers to
character strings?
printf()
Nope.


printf() is indeed capable of converting integers to character
strings -- it just has its own ideas about where the character
strings should end up. ;-)

If one cared to go through the bother, one could, completely
within standard C for hosted environments, open a file read/write,
printf() to produce the character string output, rewind to the
beginning of the file, and read the string in to the desired
destination buffer. Sure it'd be clunky, but conformant.
Depending on how many extensions one was willing to live with, there is
even a case in which the operation might be relatively efficient -- if
one closed stdout, nmap()'d some memory, took the fd from that [which
would be the fd normally used for stdout because of the POSIX rules
about using the first available fd], used fdopen() to pull that up to a
FILE*, and used printf() to do the desired conversion, then the result
could be read back directly from the memory area nmap'd to.
Who needs simple standard sprintf() when one can use something
complicated, not generally portable, but 3001 ? ;-)
--
Oh, to be a Blobel!
Nov 14 '05 #6
Walter Roberson wrote:
In article <3b*************@individual.net>,
Artie Gold <ar*******@austin.rr.com> wrote:
Neil Kurzman wrote:
John Carroll wrote:

Does anyone have a function or procedure for converting integers to
character strings?
printf()


Nope.

printf() is indeed capable of converting integers to character
strings -- it just has its own ideas about where the character
strings should end up. ;-)

If one cared to go through the bother, one could, completely
within standard C for hosted environments, open a file read/write,
printf() to produce the character string output, rewind to the
beginning of the file, and read the string in to the desired
destination buffer. Sure it'd be clunky, but conformant.
Depending on how many extensions one was willing to live with, there is
even a case in which the operation might be relatively efficient -- if
one closed stdout, nmap()'d some memory, took the fd from that [which
would be the fd normally used for stdout because of the POSIX rules
about using the first available fd], used fdopen() to pull that up to a
FILE*, and used printf() to do the desired conversion, then the result
could be read back directly from the memory area nmap'd to.
Who needs simple standard sprintf() when one can use something
complicated, not generally portable, but 3001 ? ;-)


Hmmm. Seems you're about a week late on this response (at least in my
time zone) ;-) ;-)

Cheers,
--ag

[Well, at least it's not "TCP/IP by carrier pigeon"!]
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
Nov 14 '05 #7
In article <3b*************@individual.net>,
Artie Gold <ar*******@austin.rr.com> wrote:
Walter Roberson wrote: [...]

Hmmm. Seems you're about a week late on this response (at least in my
time zone) ;-) ;-) [Well, at least it's not "TCP/IP by carrier pigeon"!]


?? According to the message headers, the message that started this
thread was posted at Fri, 08 Apr 2005 12:07:41 EDT, your response was
posted at Fri Apr 08 22:25:33 CDT 2005, and my response was posted at 9
Apr 2005 04:26:55 GMT. I am in CDT myself, as you are, (even though the
posting headers are GMT); I'm pretty much due north of you. CDT is GMT-5,
so my posting was 23:26:55 CDT, or only a hair more than 1 hour after
your posting.
--
"I want to make sure [a user] can't get through ... an online
experience without hitting a Microsoft ad"
-- Steve Ballmer [Microsoft Chief Executive]
Nov 14 '05 #8
ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) writes:
In article <3b*************@individual.net>,
Artie Gold <ar*******@austin.rr.com> wrote:
Walter Roberson wrote:

[...]

Hmmm. Seems you're about a week late on this response (at least in my
time zone) ;-) ;-)

[Well, at least it's not "TCP/IP by carrier pigeon"!]


?? According to the message headers, the message that started this
thread was posted at Fri, 08 Apr 2005 12:07:41 EDT,

[snip]

Which is one week after April Fool's Day.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #9
On 9 Apr 2005 04:26:55 GMT, Walter Roberson
<ro******@ibd.nrc-cnrc.gc.ca> wrote:
printf() is indeed capable of converting integers to character
strings -- it just has its own ideas about where the character
strings should end up. ;-)

If one cared to go through the bother, one could, completely
within standard C for hosted environments, open a file read/write,
Using freopen().
printf() to produce the character string output, rewind to the
beginning of the file, and read the string in to the desired
destination buffer. Sure it'd be clunky, but conformant.
You forgot to delete the file afterwards. Unfortunately tmpfile() can't
be used to reopen stdout (and in my experience the autodelete
functionality of tmpfile() is one of the things broken in a number of
implementations).
Depending on how many extensions one was willing to live with, there is
even a case in which the operation might be relatively efficient -- if
one closed stdout, nmap()'d some memory, took the fd from that [which
would be the fd normally used for stdout because of the POSIX rules
about using the first available fd], used fdopen() to pull that up to a
FILE*,
Which is not guaranteed to be stdout, as I read POSIX (the fd will be
the one used for stdout, but the fp won't).
and used printf() to do the desired conversion, then the result
could be read back directly from the memory area nmap'd to.
Who needs simple standard sprintf() when one can use something
complicated, not generally portable, but 3001 ? ;-)


3001?

Chris C
Nov 14 '05 #10
John Carroll wrote:
Does anyone have a function or procedure for converting integers to
character strings?

Thank you,
John

#include <stdio.h>

int main( void ) {

int i = 1234;
char string[100];

sprintf( string, "%d", i );
puts( string );
return 0;
}
Nov 14 '05 #11
In article <d3**********@canopus.cc.umanitoba.ca>
Walter Roberson <ro******@ibd.nrc-cnrc.gc.ca> wrote:
If one cared to go through the bother, one could, completely
within standard C for hosted environments, open a file read/write,
printf() to produce the character string output, rewind to the
beginning of the file, and read the string in to the desired
destination buffer. Sure it'd be clunky, but conformant.


I have actually used this trick to implement snprintf().

Remember to rewind the file twice! :-) (Once after the vfprintf,
once more after reading the printed output.)
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.
Nov 14 '05 #12


Artie Gold wrote:
Neil Kurzman wrote:
John Carroll wrote:

Does anyone have a function or procedure for converting integers to
character strings?

Thank you,
John


[top posting orrected]
> itoa()


No such thing.
> printf()


Nope.
> sprintf()


Yup!

HTH,
--ag

--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays


itoa() exists, I assume it is non-standard??

I listed printf() because what do you do with a string. fprintf() would
be the other destination.
Nov 14 '05 #13
Neil Kurzman wrote:
Artie Gold wrote:
Neil Kurzman wrote:
John Carroll wrote:

Does anyone have a function or procedure for converting integers
to character strings?


[top posting orrected]
itoa()


No such thing.
printf()


Nope.
sprintf()


Yup!


itoa() exists, I assume it is non-standard??


It only exists if you publish its source code. For example:

char *itoa(int i)
{
if ('i' == i) return "a";
else return "";
}

which should quite reliably convert 'i's into 'a's. Maybe you now
appreciate the point?

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #14
Neil Kurzman <ns*@mail.asb.com> writes:
Artie Gold wrote:

[...]
> itoa()


No such thing.
> printf()


Nope.
> sprintf()


Yup!
>


itoa() exists, I assume it is non-standard??

I listed printf() because what do you do with a string. fprintf() would
be the other destination.


You can do anything you like with a string. Printing it to stdout or
to a specified file doesn't begin to exhaust the possibilities.

printf() may convert the integer to a character string internally, but
that doesn't help if you want to get at the character string (which is
what the OP was asking for).

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #15
Neil Kurzman wrote:
itoa() exists, I assume it is non-standard??


itoa is the homework exercises from K&R, section 3.6, Loops - Do-while

--
pete
Nov 14 '05 #16
Neil Kurzman wrote on 11/04/05 :
itoa() exists, I assume it is non-standard??


If it not standard, it doesn't exist :-)

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

I once asked an expert COBOL programmer, how to
declare local variables in COBOL, the reply was:
"what is a local variable?"

Nov 14 '05 #17
On Mon, 11 Apr 2005 19:17:45 +0200, Emmanuel Delahaye
<em***@YOURBRAnoos.fr> wrote:
Neil Kurzman wrote on 11/04/05 :
itoa() exists, I assume it is non-standard??


If it not standard, it doesn't exist :-)


That's one of the stupid attitudes which encourages people to label
comp.lang.c as a bunch of ego-wankers.

Of course itoa() exists on many systems and in many program sources. It
simply isn't On Topic for this newsgroup, and can't be used portably.

Chris C
Nov 14 '05 #18
Chris Croughton <ch***@keristor.net> spoke thus:
Of course itoa() exists on many systems and in many program sources. It
simply isn't On Topic for this newsgroup, and can't be used portably.


But can it be written portably? That's a valid question here.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #19
On Mon, 11 Apr 2005 19:40:42 +0100, in comp.lang.c , Chris Croughton
<ch***@keristor.net> wrote:
On Mon, 11 Apr 2005 19:17:45 +0200, Emmanuel Delahaye
<em***@YOURBRAnoos.fr> wrote:
Neil Kurzman wrote on 11/04/05 :
itoa() exists, I assume it is non-standard??
If it not standard, it doesn't exist :-)


That's one of the stupid attitudes which encourages people to label
comp.lang.c as a bunch of ego-wankers.


Did you notice the smiley? Being humor-impaired is one of the other
things that causes the above reaction.
Of course itoa() exists on many systems and in many program sources. It
simply isn't On Topic for this newsgroup, and can't be used portably.


quite.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #20
Chris Croughton <ch***@keristor.net> writes:
On Mon, 11 Apr 2005 19:17:45 +0200, Emmanuel Delahaye
<em***@YOURBRAnoos.fr> wrote:
Neil Kurzman wrote on 11/04/05 :
itoa() exists, I assume it is non-standard??
If it not standard, it doesn't exist :-)


That's one of the stupid attitudes which encourages people to label
comp.lang.c as a bunch of ego-wankers.


I agree that the attitude can go a bit too far sometimes. For
example, it's absurd to assert that the open() and close() functions
don't exist. They do exist as part of the POSIX standard (and a
non-POSIX program is free to define functions, or other entities, with
the same names). But the POSIX-specific functions are off-topic here
in comp.lang.c.
Of course itoa() exists on many systems and in many program sources. It
simply isn't On Topic for this newsgroup, and can't be used portably.


Does it really? I just checked several systems I have access to; none
of them define an itoa() function.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #21
Christopher Benson-Manica wrote:
Chris Croughton <ch***@keristor.net> spoke thus:
Of course itoa() exists on many systems and in many program
sources. It simply isn't On Topic for this newsgroup, and can't
be used portably.


But can it be written portably? That's a valid question here.


I'll answer that as soon as you define exactly what it does. I put
up a valid implementation yesterday or so, didn't you like it? I
believe it reliably converted an 'i' to an 'a', and was completely
portable.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #22
CBFalconer <cb********@yahoo.com> spoke thus:
I'll answer that as soon as you define exactly what it does. I put
up a valid implementation yesterday or so, didn't you like it? I
believe it reliably converted an 'i' to an 'a', and was completely
portable.


Sorry for implying otherwise...

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #23
On Mon, 11 Apr 2005 21:28:08 GMT, Keith Thompson
<ks***@mib.org> wrote:
I agree that the attitude can go a bit too far sometimes. For
example, it's absurd to assert that the open() and close() functions
don't exist. They do exist as part of the POSIX standard (and a
non-POSIX program is free to define functions, or other entities, with
the same names). But the POSIX-specific functions are off-topic here
in comp.lang.c.


Yes, exactly. It's one thing to say "Those functions are off-topic
here, because they aren't part of Standard C, try somewhere like
comp.unix.programmer", and a different one to say a blanket "it doesn't
exist". The latter will just get the OP's response "Yes it does!".
Of course itoa() exists on many systems and in many program sources. It
simply isn't On Topic for this newsgroup, and can't be used portably.


Does it really? I just checked several systems I have access to; none
of them define an itoa() function.


Borland defines it for Win32, and says under 'portability' that it's a
Win32 function. I remember it being on DOS as well. I've also seen it
re-implemented in code for *ix software, so it 'exists' on those systems
even if not in a system library.

Chris C
Nov 14 '05 #24
Chris Croughton wrote on 11/04/05 :
On Mon, 11 Apr 2005 19:17:45 +0200, Emmanuel Delahaye
<em***@YOURBRAnoos.fr> wrote:
Neil Kurzman wrote on 11/04/05 :
itoa() exists, I assume it is non-standard??


If it not standard, it doesn't exist :-)


That's one of the stupid attitudes which encourages people to label
comp.lang.c as a bunch of ego-wankers.


A serious lack of humour... Get a life...

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

..sig under repair

Nov 14 '05 #25
In article <mn***********************@YOURBRAnoos.fr>,
Emmanuel Delahaye <em***@YOURBRAnoos.fr> wrote:
Chris Croughton wrote on 11/04/05 :
On Mon, 11 Apr 2005 19:17:45 +0200, Emmanuel Delahaye
<em***@YOURBRAnoos.fr> wrote:
Neil Kurzman wrote on 11/04/05 :
itoa() exists, I assume it is non-standard??

If it not standard, it doesn't exist :-)


That's one of the stupid attitudes which encourages people to label
comp.lang.c as a bunch of ego-wankers.


A serious lack of humour... Get a life...


But that *is* clc.

A sense of humor is OT here. And, as with most OT posts, the regulars will
generally be more than willing to supply names of other newsgroups where
what you seek is on topic. For example, I suggest: alt.folklore.urban.

Nov 15 '05 #26
> From: "John Carroll" <or*******@yahoo.com>
Does anyone have a function or procedure for converting integers to
character strings?


Your question is hopelessly vague. There are all sorts of mappings from
integers to character strings. Here are just a few (with quote marks
omitted):

Arabic numerals:
Decimal: 42
Octal: 52
Hexadecimal: 2A
Binary: 101010
Unary with stop bit: 1111111111111111111111111111111111111111110
Tally:
Original: IIIII IIIII IIIII IIIII IIIII IIIII IIIII IIIII II
Old: <http://www.rawbw.com/~rem/AsciiArt/TallyOldAA.txt>
New: <http://www.rawbw.com/~rem/AsciiArt/TallyNewAA.txt>
Roman numerals:
Old: XXXXII
New: XLII
Cardinal:
English: forty-two
German: zwei und vierzig (Note: AltaVista Babelfish gets this wrong!)
French: quarante deux
Spanish: cuarenta dos
Portuguese: quarenta dois
Ordinal:
English: forty-second
French: quarante seconde
Spanish: cuarenta segundos
Portuguese: quarenta segundos
German: (Babelfish says vierzig zweites, but I don't believe it's correct.)
Traditional base 12:
English: three dozen and six
French: trois douzaines et six
German: drei Dutzend und sechs
Spanish: tres docenas y seises
Traditional by Abraham Lincoln:
English: two score and two

So do you want a single function capable of all those conversions, or what?

Oh, you just want a single character? That's not possible because the
range of integers is larger than the range allowed for a single
character, whether a single byte (US-ASCII or Latin-1) or double byte
(subset of UniCode). If you restrict the range of integers to what
will fit in a single byte, then you have your choice of Latin-1 or
several other system-dependent codes. If you restrict the range of
integers to what will fit in 7 bits, you have your choice of US-ASCII
or EBCDIC. (C provides support only for US-ASCII, via a "cast".) If you
restrict the range of integers to 0 thru 35, you have extended
IBM-hexadecimal: 0123...9ABCDE...XYZ. If you restrict the range to only
0 thru 15, C provides support via sprintf(&ch, "%x", intval).
Nov 15 '05 #27
In article <RE***************@Yahoo.Com>,
Robert Maas, see http://tinyurl.com/uh3t <re*****@Yahoo.Com> wrote:
From: "John Carroll" <or*******@yahoo.com>
Does anyone have a function or procedure for converting integers to
character strings?


Your question is hopelessly vague. There are all sorts of mappings from
integers to character strings. Here are just a few ...


and the void would be calling
--
7842++
Nov 15 '05 #28
re*****@Yahoo.Com (Robert Maas, see http://tinyurl.com/uh3t) wrote:
# > From: "John Carroll" <or*******@yahoo.com>
# > Does anyone have a function or procedure for converting integers to
# > character strings?

char b[sizeof(int)*CHAR_BIT/3+1];
sprintf(b,"%d",int_value);

The formatted integer is in b.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
GERBILS
GERBILS
GERBILS
Nov 15 '05 #29
In article <RE***************@Yahoo.Com>,
Robert Maas, see http://tinyurl.com/uh3t <re*****@Yahoo.Com> wrote:
Your question is hopelessly vague. There are all sorts of mappings from
integers to character strings. Here are just a few Traditional base 12:
English: three dozen and six


It seems to me that more traditional would be
"three and a half dozen"

--
History is a pile of debris -- Laurie Anderson
Nov 15 '05 #30
On Tue, 28 Jun 2005 17:12:27 -0700, Robert Maas, see http://tinyurl.com/uh3t
<re*****@Yahoo.Com> wrote:
From: "John Carroll" <or*******@yahoo.com>
Does anyone have a function or procedure for converting integers to
character strings?
Your question is hopelessly vague. There are all sorts of mappings from
integers to character strings. Here are just a few (with quote marks
omitted):

Arabic numerals:
Tally:
Roman numerals:
Cardinal:
English: forty-two
German: zwei und vierzig (Note: AltaVista Babelfish gets this wrong!)


So do you <g>. It's zweiundvierzig, all one word <g>.
Ordinal:
Traditional base 12:
English: three dozen and six
Three and a half dozen would be more likely.
Traditional by Abraham Lincoln:
Base64 (as used in HTLM/XML/etc.):

Aq==
Oh, you just want a single character? That's not possible because the
range of integers is larger than the range allowed for a single
character, whether a single byte (US-ASCII or Latin-1) or double byte
(subset of UniCode). If you restrict the range of integers to what
will fit in a single byte, then you have your choice of Latin-1 or
several other system-dependent codes. If you restrict the range of
integers to what will fit in 7 bits, you have your choice of US-ASCII
or EBCDIC. (C provides support only for US-ASCII, via a "cast".)
No, C provides support for whatever the implementation and runtime
character sets are, which need not be US-ASCII. EBCDIC works just as
well, as does any character set which fulfils the requirements:

Section 5.2.1 "Character sets"

3 Both the basic source and basic execution character sets shall have
the following members: the 26 uppercase letters of the Latin
alphabet

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

the 26 lowercase letters of the Latin alphabet

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

the 10 decimal digits

0 1 2 3 4 5 6 7 8 9

the following 29 graphic characters

! " # % & ' ( ) * + , - . / :
; < = > ? [ \ ] ^ _ { | } ~

the space character, and control characters representing horizontal
tab, vertical tab, and form feed. The representation of each member
of the source and execution basic character sets shall fit in a
byte. In both the source and execution basic character sets, the
value of each character after 0 in the above list of decimal digits
shall be one greater than the value of the previous. In source
files, there shall be some way of indicating the end of each line of
text; this International Standard treats such an end-of-line
indicator as if it were a single new-line character. In the basic
execution character set, there shall be control characters
representing alert, backspace, carriage return, and new line.
If you restrict the range of integers to 0 thru 35, you have extended
IBM-hexadecimal: 0123...9ABCDE...XYZ. If you restrict the range to
only 0 thru 15, C provides support via sprintf(&ch, "%x", intval).


If you restrict it to 0..63 you can use the Base64 encoding:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789+/

Chris C
Nov 15 '05 #31

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

Similar topics

5
by: Brad Moore | last post by:
Hey all, I'm getting the following compiler error from my code. I was wondering if anyone could help me understand the concept behind it (I actually did try and compile this degenerate...
7
by: MilanB | last post by:
Hello How to convert char to int? Thanks
2
by: Alper Akcayoz | last post by:
Hello Esteemed Developpers I would like to thank you in advance for your sincere responses I am a fresh Visual C++ .NET Developer. Can you kindly guide me for How to Convert char* to System::String
1
by: Elioth | last post by:
Hi... I need to know how to convert Char Array to Byte Array and vice-versa in VB 2K5 Thanks for all help. Elioth
2
by: Joah Senegal | last post by:
Hello I need to convert a chat to a string... but I don't know how to do this. i;ve searched the internet but I've only find some code to convert char * to string or char to string.... but I...
3
by: simon | last post by:
I am a fresh Visual C++ .NET Developer. Can you kindly guide me for How to Convert char to System::String I am using windows forms and trying to set a text value referencing the method...
2
by: Rasheed | last post by:
Hi, i have a char pointer buffer which will hold the bitmap buffer, So i need to convert char *buffer as a bitmap. becuase when i draw on the Dialog using char *buffer. Nothing will be dispalyed....
1
by: helios | last post by:
Hi all, I'm resolved problem. and I want anybody need me that convert char to array bits char ConvertChar2ArrayBit(char ch) { char Bits; .... return Bits; } for...
3
by: mamul | last post by:
Hi please some one can help me. how to convert char * to string? i have take char *argv from command line and want to pass to a function as string object(string str) i want to first convert argv...
3
by: DaveRook | last post by:
Hi I've had a few error messages with this I don't understand why. It works fine in a Windows Form, but now moving it to a website, it's not working. I don't have the option to count the lines as...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.