I am facing a problem with the Raindrops problem under C++ track. I keep getting an error saying ‘convert’ is not a member of ‘raindrops’ and I don’t understand. I have named my function ‘convert’ as stated but the error keeps on appearing. I’d appreciate any help given
Please do share code and errors – as text in a codeblock. It’s really hard to reproduce issues using code from images. More so for the visually impaired.
While posting your code and errors, could you include the header file? Is the function defined in there?
The Hello World example exercise has function definition ... hello() { ... } in the .cpp file, and it has function declaration ... hello(); in the .h file.
We need something comparable here: you will need to add a function declaration to raindrops.h
The test file has
#include "raindrops.h"
When the test file is being compiled, the compiler does not see the function definition string convert(int n){ ... } in raindrop.cpp
Oh okay. I am new to using header files so I thought the system would handle that. Thank you very much. I will do some research on this later to better understand