In input()
, where I call Table()
, I get an error that the function is not declared:
#include <iostream>
using namespace std;
void input(){
Table();
}
void Table(){
input();
}
int main(){
input();
Table();
}
In input()
, where I call Table()
, I get an error that the function is not declared:
#include <iostream>
using namespace std;
void input(){
Table();
}
void Table(){
input();
}
int main(){
input();
Table();
}
At the point where you're attempting to call Table(), the function is not known yet. Add a forward declaration to make it work, like so:
using namespace std;
void Table(); // <-- forward declaration
void input(){ Table(); }
void Table(){ input(); }
int main(){ input(); Table(); }