User forums > Using Code::Blocks
Error in compiling in CB
(1/1)
Vivasso:
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
--- End code ---
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
Jenna:
--- Quote from: Vivasso on December 16, 2010, 05:17:15 pm ---Can someone help me?
--- End quote ---
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 !!
Navigation
[0] Message Index
Go to full version