Problem doing an e-mail program in C

B

Barry Schwarz

ok..so what I did until now is this...
the main file is this one:
------------------------------(progmail.c)----
#include <stdio.h> /* para funcoes como printf, scanf, etc */
#include <stdlib.h> /* para a funcao exit */
#include <string.h> /* para funcoes relacionadas com strings */
#define DIMMAIN 20

void comandom(void);

This prototype says the function has no parameters.

snip
void comandom(MAIL *ptr)

This definition says the function has one parameter. When you lie to
the compiler, you invoke undefined behavior.
{
printf("From: \n"); gets(ptr->from);
printf("To: \n"); gets(ptr->to);
printf("Subject:\n"); gets(ptr->sub);
printf("Message:\n"); gets(ptr->msg);


}
------------------------------
snip


<<Remove the del for email>>
 
T

tyler_durden

thanks a lot for all your help..I'm really appreciated...
with all the help I've been getting in forums I've been able to continue
my program and it's almost done, but I'm having a big problem that I
believe is it's solved, the remaining stuff is easy...
my full program until now is here:
http://www.geocities.com/tom4_h4wk/progmail.zip

the problem is the segmentation fault when main trys to run
leficheiro.c.... the *.c2 files are the functions I am working now...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top