Use of forward declarations in sound-playing app

1 comments · 100% upvoted · source · other discussions

comments

goodgamin [OP]

At the top of the file, these lines must be there

void play(std::string);
void close();

in order to tell the compiler that these functions exist before the definition is seen. Otherwise, there would be an error when the functions appear in main().