This is my code:
mainheader.h
void displaygrid(int (* _grid)[10][10] , string msg );
something.cpp
#include <string> #include "mainheader.h" void displaygrid(int (* _grid)[10][10], string msg = "" ) { //body goes here }
Compiler says at line of forward declaration in header:
_grid and string are undeclared identifiers
however since its just prototype, it shouldnt be worried about existence of _grid
, right ?
Also, header is included after the string , but it doesnt know about string as well. It looks like its trying to call function instead of forward declaring. What's wrong?