Strings in C is a problematic matter for novices like me. You usually see that your first guess is wrong and are puzzled until you discover the "C" way. The simple '=' operator does not work (except initialization) and you have to use the strcpy function. Below is an example where I assign the file's name to the variable fileName and then use it in fopen (source code here):
Friday, May 25, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment