Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can I open files with names like ...
How can I open files with names like ``file1'', ``file2'', ``file3'', etc., where the numeric part is controlled by a variable? Basically I want ``file%d'', like printf..
✍: Guest
You want printf's close cousin sprintf, which ``prints'' to a string:
char filename[FILENAME_MAX];
sprintf(filename, "file%d", i);
fp = fopen(filename, "r");
2015-10-07, 1372👍, 0💬
Popular Posts:
How To Give a User Read-Only Access to a Database? - MySQL FAQs - Managing User Accounts and Access ...
What is triple constraint triangle in project management ? Project Management triangle is depicted a...
How do I force the Dispose method to be called automatically, as clients can forget to call Dispose ...
What is shadowing ? When two elements in a program have same name, one of them can hide and shadow t...
How To Use "IF" Statements on Multiple Conditions? - Oracle DBA FAQ - Understanding PL/SQL Language ...