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

Re: sprintf equivalent in c++

u can use ostream

ostream out;

out << "something here";

more info: http://www.cplusplus.com/reference/iostream/ostream/
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

Oct 10 '08 #1
1 2464
On Oct 10, 11:18 am, "asdf" <someth...@nothing.comwrote:
u can use ostream

ostream out;

out << "something here";

more info:http://www.cplusplus.com/reference/iostream/ostream/

--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free fromhttp://www.shemes.com/ =-
More interesting way: http://www.morearty.com/code/streamprintf/
Oct 10 '08 #2

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

Similar topics

11
by: Frank Neuhaus | last post by:
Hey Iam occaisonally using something like char buffer; sprinf(buffer,"Hello test %d %s",someint,somestring); Is there any _convenient_ and buffer overflow secure equivalent for that using...
10
by: ios | last post by:
Hi Can someone tell me what is different between below case? strcpy(eventname, "MDCX_RSP"); and sprintf(eventname, "MDCX_RSP"); Thanks, Leon
4
by: William Stacey [MVP] | last post by:
If val is a long, what is the String format conversion of this in c#? TIA! sprintf(retbuf,"%d.%.2d", val/100, val%100); -- William Stacey
4
by: adamrobillard | last post by:
Hi, I went through most of the FAQ but did not find any direct references formatting outputed data. If I have a application in C like so: void main(void) { int nValue = 100; double...
10
by: Saurabh | last post by:
Hi all, I am working on RedHat Linux GCC 3.0. I am trying to convert a long to string through sprintf. but i m getting segmantation fault. I tried snprintf also but no avail.here is the piece...
66
by: gyan | last post by:
Hi All, I am using sprintf and getting starnge output in following case char temp_rn; memset(temp_rn,'\0',12); sprintf(temp_rn,"0%s",temp_rn); the final value in temp_rn is 00 how it...
2
by: jasonwthompson | last post by:
I'm converting some old C code to C++. Although I'm not concerned about converting every C item to C++ I'm in a situation in which using an ostringstream makes more sense than using sprintf. ...
173
by: Ron Ford | last post by:
I'm looking for a freeware c99 compiler for windows. I had intended to use MS's Visual C++ Express and use its C capability. In the past with my MS products, I've simply needed to make .c the...
44
by: A.Leopold | last post by:
hello, is there a c++ equivalent function to the c-function 'sprintf'? Thank you, leo
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.