Question
Im using segger embbeded studio and I keep getting a compilation error on count = numTimesAppears(mystring, ch); Please Help. #include #include #include #include extern float
Im using segger embbeded studio and I keep getting a compilation error on count = numTimesAppears(mystring, ch); Please Help.
#include #include #include #include
extern float toKilometers(float) ; extern float computeTax(float); extern int numTimesAppears(char *, char) ; extern int toInches(int );
void main(void) { int i; char mystring[100]="Yusuf Ozturk"; char ch; float miles, km; int inches, feet; float salesamount, tax; int count; miles = 21.5;
km = toKilometers (miles); printf(" %G miles is equal to %G kilometers", miles, km);
salesamount = 123; tax = computeTax(salesamount); printf(" the sales tax for the %G amount is %G",salesamount, tax);
feet = 25; inches = toInches(feet); printf(" %d feet is equal to %d inches", feet, inches);
ch = 'u'; count = numTimesAppears(mystring, ch); // The compiler keeps telling me "undefined reference to `numTimesAppears" printf(" Number of times %c appears in string is %d", ch, count);
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started