sprintf has no effect in multiple compilation units
Posted: Mon Jan 18, 2016 5:16 pm
Hello,
I have noticed a strange behavior of sprintf function. It has no effect when called within a C file other than the main one in multiple compilation units. If I move the same statement to the main() function, it works normally.
Any thoughts?
Thanks
newguy
Joined: 24 Jun 2004 Posts: 1909
Posted: Mon Jan 18, 2016 6:11 pm
What is it printing to? Is that something "visible" in both compilation units/files?
PICoHolic
Joined: 04 Jan 2005 Posts: 224
Posted: Mon Jan 18, 2016 11:33 pm
Hello newguy,
No, it's not visible to both units; just to the one I'm calling from. Should it be visible to both?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum