Can someone help with my code? I'm getting error messages when I try to run it.
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <conio.h>
void main(void)
{
char partid[7];
void inputch(char *);
inputch(partid);
}
void inputch(char pID[])
{
char ch;
printf("What is the Part ID? "
;
do {
ch = toupper(getch()); //uppercase user input
if (ch != '\0') { //doesn't equal null
if (isalpha(ch)) //if its a character
putch(ch); //write it to the screen
}
} while (ch != '\r'); //carraige return
}
The error messages are:
Validate.obj : error LNK2001: unresolved external symbol "void __cdecl inputch(char *)" (?inputch@@YAXPAD@Z)
Debug/Validate.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Thanks!
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <conio.h>
void main(void)
{
char partid[7];
void inputch(char *);
inputch(partid);
}
void inputch(char pID[])
{
char ch;
printf("What is the Part ID? "
do {
ch = toupper(getch()); //uppercase user input
if (ch != '\0') { //doesn't equal null
if (isalpha(ch)) //if its a character
putch(ch); //write it to the screen
}
} while (ch != '\r'); //carraige return
}
The error messages are:
Validate.obj : error LNK2001: unresolved external symbol "void __cdecl inputch(char *)" (?inputch@@YAXPAD@Z)
Debug/Validate.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Thanks!