saving files

"Ashish Chawla" <[email protected]> Fri, 13 Apr 2007 17:44:35 -0400
Newsgroups gmane.comp.gcc.cgicc.general
Message-ID <[email protected]>
--===============0131979719==
Content-Type: multipart/alternative; 
	boundary="----=_Part_16094_32122121.1176500675744"

------=_Part_16094_32122121.1176500675744
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I am having trouble saving files using cgicc
when i run the file through the terminal, it creates the files, but when i
run through a web interface, it does everything except creating the file

here is my code for a test file

#include <iostream>
#include <fstream>
#include <string>
#include "cgicc/Cgicc.h"
#include "cgicc/CgiDefs.h"
#include "cgicc/HTTPHTMLHeader.h"
#include "cgicc/HTMLClasses.h"
#include "stdio.h"


using namespace cgicc;
using namespace std;


int main(int argc, char* argv[])
{

    cout << HTTPHTMLHeader() << endl;
    cout<< "<html><head></head><body>" <<endl;

    cout<<"creating file test"<<endl;
    ofstream Students("test.txt");
        Students << "some" << "\n" << "name"<< "\n";

    cout << "</body><html>" <<endl;
    return 0;
}

------=_Part_16094_32122121.1176500675744
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi, <br><br>I am having trouble saving files using cgicc<br>when i run the file through the terminal, it creates the files, but when i run through a web interface, it does everything except creating the file<br><br>here is my code for a test file
<br><br>#include &lt;iostream&gt;<br>#include &lt;fstream&gt;<br>#include &lt;string&gt;<br>#include &quot;cgicc/Cgicc.h&quot;<br>#include &quot;cgicc/CgiDefs.h&quot;<br>#include &quot;cgicc/HTTPHTMLHeader.h&quot;<br>#include &quot;cgicc/HTMLClasses.h&quot;
<br>#include &quot;stdio.h&quot;<br><br><br>using namespace cgicc;<br>using namespace std;<br><br><br>int main(int argc, char* argv[])<br>{<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; cout &lt;&lt; HTTPHTMLHeader() &lt;&lt; endl;<br>&nbsp;&nbsp;&nbsp; cout&lt;&lt; &quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&quot; &lt;&lt;endl;
<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; cout&lt;&lt;&quot;creating file test&quot;&lt;&lt;endl;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; ofstream Students(&quot;test.txt&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Students &lt;&lt; &quot;some&quot; &lt;&lt; &quot;\n&quot; &lt;&lt; &quot;name&quot;&lt;&lt; &quot;\n&quot;;
<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;&lt;/body&gt;&lt;html&gt;&quot; &lt;&lt;endl;<br>&nbsp;&nbsp;&nbsp; return 0;<br>}<br><br><br>

------=_Part_16094_32122121.1176500675744--



--===============0131979719==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
help-cgicc mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cgicc

--===============0131979719==--