extern "C" {
double bleft(double);
}
which declares sqrt to be a function that takes a
double as an argument and returns a double. This information is
needed so that C++ can check that your uses of this function have the
correct type. If you're using makefiles, you can have the files combined automatically. You'd could use a Makefile like:
SRCS = foo.C bar.c OBJS = foo.o bar.o .SUFFIXES: .C .o .C.o: ; $(C++) $(C++FLAGS) -c $< C++=g++ prog: $(OBJS) $(C++) $(C++FLAGS) -o prog $(OBJS) -lmto link together foo.c (the c++ file) and bar.c (ordinary C) to make the executable program prog.