Like I have mentioned before I am trying to work on Image processin code..
I wrote this error out code, it deals with encoding and RCPC channel code
Anyway.. I am getting this error when I execute it. This is the only error I am gettin and not able to solve it
please help.....
Tavisha
[ code]
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void err (float eprob)
{
FILE *f1, *f2;
int r,num=0;
float x;
float r_num;
char a,b='0', c ='1';
f1= fopen("rcpcputput.txt","r");
f2=fopen( "erroutput.txt","w");
printf("\n Enter the error probability");
scanf("%1f",&eprob);
printf("\n Error probability is %1f",eprob);
while (!feof(f1))
{
fscanf(f1,"%c",&a);
printf("\n read is %c",a);
r=(10000);
printf("random is %d",r);
x=(float)r;
r_num=x/10000;
if (r_num<eprob)
{
if (a==
a=c;
else a=b;
num++;
}
fprintf (f2,"%c",a);
printf("random is %f probabilty is %f written is %c",r_num,eprob,a);
}
printf("\n\n Number of bit errors is %d",num);
fclose(f1);
fclose(f2);
getch;
}
[code ends]
C:\TurboCPP\C code\MyErr.c||In function `void err(float)':|
C:\TurboCPP\C code\MyErr.c|43|warning: statement is a reference, not call, to function `getch'|
C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libmingw32.a(main.o):main.c:(.text+0x104)|| \undefined reference to `_WinMain@16'|
||=== Build finished: 1 errors, 1 warnings ===|
I even tried to get the MINGW \bin\..lib file in my c:\ turbocpp\C code file but no help there!!!
Looking forward to replies...
Thanks....
The error I get is :

New Topic/Question
Reply




MultiQuote








|