You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first, you have to tell the compiler, that putnumb exists, you can do that by adding
extrn putnumb;
to the start of your main() function.
Secondly, you have to define putnumb somewhere, as this is not a function found in B's standard library. Maybe putnumb isn't listed in the B reference, in that case you're welcome to implement it yourself into src/libb/libb.c :D
Or you replace putnumb(sum) with printf("%d*n"). Then your program would look like:
main() {
extrnprintf;
auto a, b, c, sum;
a=1; b=2; c=3;
sum=a+b+c;
printf("%d*n", sum);
}
Hello! I get very first example from here and get en error:
Why library function
putnumb
is undefined? What's wrong?The text was updated successfully, but these errors were encountered: