User Tools

Site Tools


root:strings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
root:strings [2010/11/10 10:40] nchiaproot:strings [2010/11/10 10:45] nchiap
Line 19: Line 19:
 </code> </code>
  
-If your variable is a TString, you need to convert it first+If your variable is a TString, you need to pass the underlying char array
 <code C++> <code C++>
-TString string = Form("My TString is %s", (char*tstring);+TString string = Form("My TString is %s", tstring.Data() );
 </code> </code>
  
 The function follows [[http://www.cplusplus.com/reference/clibrary/cstdio/printf/| printf]]-syntax The function follows [[http://www.cplusplus.com/reference/clibrary/cstdio/printf/| printf]]-syntax
  
root/strings.txt · Last modified: 2010/11/10 12:01 by nchiap