Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » problem with fprintf
Re: problem with fprintf [message #29332 is a reply to message #29217] Fri, 15 October 2010 14:44 Go to previous message
mirek is currently offline  mirek
Messages: 13051
Registered: November 2005
Ultimate Member
o_wild wrote on Mon, 11 October 2010 08:08

The following code is excerpt of an opensource software, but there is error when compiled.

fprintf(ofp,"%s\n",mes1); // mes1 is of type String

Is their any substitute for 'fprintf'? by the way, i tested 'printf' and found the same problem.


Yes, Format. It is typesafe - you would not encounter above kind of problem there.

So in "true" U++ the code would look like this:

FileOut ofp;
....
ofp.Put(Format("%d\n", mes1);
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error in HomeBudget Example?
Next Topic: HttpClient Execute vs ExecuteRedirect
Goto Forum:
  


Current Time: Sat Jan 23 11:33:47 CET 2021

Total time taken to generate the page: 0.01272 seconds