Welcome, Guest. Please
login
or
register
.
Forums
Forums
Board
Topic
Home
Today's Posts
Gallery
Login
Register
Amiga.org
»
Operating System Specific Discussions
»
Amiga OS
»
Amiga OS -- Development
»
printf output to string possible ?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: printf output to string possible ? (Read 3162 times)
Description:
0 Members and 1 Guest are viewing this topic.
Jose
Hero Member
Join Date: Feb 2002
Posts: 2871
printf output to string possible ?
«
on:
September 10, 2005, 12:05:55 PM »
Hi. Is there a way that one can have the output of printf() put into a string instead of stdout ? I know there's a function to change the output stream but it requires a file or handle to be passed IIRC...
I have done a function that does this but it's a bit limited on the types it uses, I thought that maybe printf() could be used for this also....
Logged
\\"We made Amiga, they {bleep}ed it up\\"
Jose
Hero Member
Join Date: Feb 2002
Posts: 2871
Re: printf output to string possible ?
«
Reply #1 on:
September 10, 2005, 12:28:53 PM »
@Thomas
Sounds great :-)
Logged
\\"We made Amiga, they {bleep}ed it up\\"
Jose
Hero Member
Join Date: Feb 2002
Posts: 2871
Re: printf output to string possible ?
«
Reply #2 on:
September 10, 2005, 02:49:35 PM »
@Piru
"(void (*)(void))"
Wouldn't a simple cast to void work here? I don't get it, it's not even a function.. :-?
@CrazyProg
Yeah that's cool, but I'm allocating the space dynamically after checking the size with strlen().
Logged
\\"We made Amiga, they {bleep}ed it up\\"
Jose
Hero Member
Join Date: Feb 2002
Posts: 2871
Re: printf output to string possible ?
«
Reply #3 on:
September 11, 2005, 11:05:34 AM »
Ahhh... ok. :-)
Logged
\\"We made Amiga, they {bleep}ed it up\\"
Print
Pages: [
1
]
Go Up
« previous
next »
Amiga.org
»
Operating System Specific Discussions
»
Amiga OS
»
Amiga OS -- Development
»
printf output to string possible ?
There was an error while thanking
Thanking...