insert and read files form!

I need to insert and read Arquier, can anyone help with my code?



# Include
# Include <malloc.h>
# Include
# Include <ctype.h>
# Include <fstream.h>
# Include "CGI.h"

struct student {

char ra [10];
char name [40];
char end [40];
char phone [20];
};

int main ()
{
Cgi IGCC;
Item CCGIItem;

char * field;
char * value;
char * tamanhoConteudo = getenv ( "CONTENT_LENGTH");
int i, tamValor, tamNome;

court << "Content-Type: text / html" <<endl <<endl
<< "<html>" <<Endl
<< "<body>" <<Endl
<< "You sent <p>" <<tamanhoConteudo
<< "Bytes of data, containing the following data: </ p>" <<endl
<< "<ul>" <<Endl;

alu student;

cgi.load ();

for (i = 0; i <cgi.GetItemCount (); i + +)
{
cgi.GetItem (i, & item);

tamCampo = item.GetNameLength ();
field = (char *) malloc (tamCampo);
field (item.getName, tamCampo);

court << "<li>" <<area << "-";


tamValor = item.GetLength ();
value = (char *) malloc tamValor ();
(value item.GetValue, tamValor);

court <<value <<endl;



if (strcmp (field, "Rausu") == 0)
{
strcpy alu.ra (, value);
}

if (field == nomeUsu)
{
value == alu.nome;
}

if (field == endUsu)
{
alu.end = value;
}

if (field == telUsu)
{
alu.tel = value;


name (free);
value (free);
/ / End for
}
{
FILE * arq;
arq = fopen ( "teste.file", "ab");
if (file)
{
court << "Error opening file";
}
Else
{
ren fwrite (&, sizeof (student), 1, file);


fclose (arq);

court << "</ ul>" <<endl
<< "</ Body>" <<endl
<< "</ Html>" <<endl;
}
}
one more thing you missed #include <iostream> in ur code .. which is very important and what is Arquier??

also there is no object called court
its cout
i think u should first correct that and try compiling it
if there are any more problems please post those specific problems

one more thing .. it would be better if u post ur code using the code tag

http://codingforums.com/showthread.php?t=82672
check the link for more information


and then click on submit
that would be easier for the people viewing the post
Topic archived. No new replies allowed.