CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Convert int to char (

sega April 6, 2010 10:39

Convert int to char
Hello world.

I haven't found a way of converting an int value to a char-string.
Is that possible with FLUENT UDF's?!


DoHander April 6, 2010 11:28

Try to use sprintf.

char a[100];


Now you should have in "a" 1002 as a string. I didn't actually test my above code, so you can expect to have some problems adapting this to a UDF.


sega April 7, 2010 15:04

Thank you! sprintf() was the right approach!

All times are GMT -4. The time now is 12:45.