Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Vivasso on December 16, 2010, 05:17:15 pm

Title: Error in compiling in CB
Post by: Vivasso on December 16, 2010, 05:17:15 pm
Hi I'm newbi in CB. I have to files.
The main.c with some code, and two.c with this code
Code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <sys/types.h>
#include <sys/uio.h>

int main(int argc, char * argv[]){
  char linha_escrever[1024];
  char * nome_canal;
  char * nome_sensor;
  int num_faixas, vel_maxima;
  FILE * fp;
  long intervalo;
  float velocidade, velocidade_ant;
  int acidente =0;
  int x_inic, y_inic;
  int x_fim, y_fim;


  if(argc != 9){ bla, bla
The error is "Multiple definition of main". I know that I cant have more than one file with main, but if I delete the main from the two.c file it gives me a lot of errors and I cant fix it.
Can someone help me?
Thanks
Title: Re: Error in compiling in CB
Post by: Jenna on December 16, 2010, 05:28:37 pm
Can someone help me?

No, this is far beyond our forums/sites scope, so it violates our forum rules.
Please ask it in an appropriate forum for beginners in prgramming.

Topic locked !!