![]() |
|
|
|
|
|||||||
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 11:00 AM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 09:52 PM |
| No utpmx entry: you must exec "login" from lowest level "shell" | peterpan | UNIX for Dummies Questions & Answers | 0 | 01-18-2006 12:15 AM |
| How to "Print Screen" from a dumb terminal on AIX? | stembe | UNIX for Advanced & Expert Users | 3 | 11-15-2002 08:01 AM |
| Print The ouput From ls | grep "!!!" | geoquest | UNIX for Advanced & Expert Users | 5 | 04-11-2002 02:45 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
I can print ""
I'm trying to print an xml header to a file and I don't know how
the last thing I tried is this: system("echo '<?xml version='\"1.0\"' encoding='\"UTF-8\"'?>'" > a.xml) "" are not printed The code is written in C/C++ |
| Forum Sponsor | ||
|
|
|
|||
|
Can I ask why you are using the system call from C to write to a file in the first place? You do realize that there exists a slew of API calls that are much more efficient than creating a new process to write a single line of text to a file.
Code:
FILE *fp;
fp = fopen("a.xml", "wt");
fprintf(fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
fclose(fp);
|
| Thread Tools | |
| Display Modes | |
|
|