Sunday, January 23, 2011

sprintf



Just testing my knowledge of sprintf and passing a character array. There is a point to this. I've spent the past few hours wailing away at a program that segfaults regardless of how I handle the variables. I've hit the end of a chapter in my GTK book and I wanted to make sure I understood a few things. The program I'm writing is supposed to be a window with some text in it, and the text should change to something else when you press a key (no buttons yet, just grabbing the "a key was pressed" event). For some reason I get a big fat crash/segfault when the function for changing the text happens. What kills me is that it's practically identical to a tutorial program online. I can even run that program just fine.

I'm furious over this.

No comments:

Post a Comment