Hello
thanks for the previous reply, it was helpful
In the way can i know the replacement for fscanf and fprintf in managed c++
thanks in advance
regards
jalaja
Printable View
Hello
thanks for the previous reply, it was helpful
In the way can i know the replacement for fscanf and fprintf in managed c++
thanks in advance
regards
jalaja
To handle files in text mode in C++/CLI you can use the StreamReader and StreamWriter classes.
StreamWriter has lots of overloaded versions of the Write() method that write text representations of various CTS types to the output file. This is, however, still no direct replacement for the formatting capabilities of fprintf(), but you may use String::Format() like I pointed out in the other thread and write the string obtained by that to the file.
And like for console I/O there is no direct replacement for fscanf(), but you can use StreamReader to read the text and then process this using the Parse() methods of the various CTS types as also explained in the other thread.
HTH
thank u
regards
jalaja