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, 1069👍, 0💬
Popular Posts:
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...
How did you implement UML in your project ? PART II Implementation phase / Coding phase (Class diagr...
How To List All Values of Submitted Fields? - PHP Script Tips - Processing Web Forms If you want lis...
What is a measure in OLAP ? Measures are the key performance indicator that you want to evaluate. To...
How To Enter Microseconds in SQL Statements? - MySQL FAQs - Introduction to SQL Date and Time Handli...