The program keeps telling me that I need to declare a function prototype for initialise_com_port
But Iv'e done that, can anyone tell me what's going on?
Code:
#include <stdio.h>
#include <process.h>
#include <conio.h>
void initialise_com_port();
void sort_bytes();
void create_screen();
void create_file();
char reply, key;
int main()
{
initialise_com_port();
getch();
return 0;
}
void initialise_com_port()
{
printf(" PACKET CAPTURE, DISPLAY AND STORE-TO-DISK PROGRAM\n\n");
printf(" THIS PC WILL CAPTURE 9600 BIT/S DATA COMING IN\n");
printf(" ON SERIAL PORT COM1 AND DISPLAY THE DATA\n\n\n");
printf(" Type C and then press Enter to capture and display: ");
scanf("%c", reply);
if (reply == 'C')
{
clrscr;
printf("Below are given the values of the bytes in the data field");
printf(" of each identified packet.\n\n");
sort_bytes();
create_screen();
printf("To store to disk, type D and then press Enter.\n");
printf("Not to store to disk but to capture again type C and press");
printf(" Enter\n");
printf("To return to DOS, type F and then press Enter TWICE");
scanf("%c", key);
if (key == 'C')
{
sort_bytes();
create_screen();
}
if (key == 'D')
{
create_file();
}
if (key == 'F')
{
printf("You have decided to exit from the program.");
printf("\nPress Enter");
}
else
{
printf("You did not enter C. Program assumes you want to exit");
}
}
}
void sort_bytes()
{
printf("Hello from sort_bytes!");
}
void create_screen()
{
printf("Hello from create_screen!");
}
void create_file()
{
printf("Hello from create_file!");
}