I have some functions in a namespace I made that are used throughout my program.
In header file:
namespace NQueens
{
static int heur = 0;
int CalcHeuristic(char** state, int size);
void CalcHorzH(char ** state, int &heuristic, int size);
void CalcColH(char ** state, int &heuristic, int size);
void CalcDiagH(char ** state, int &heuristic, int size);
int calcCollisions(int queensPerRow, int size);
}
Everything works fine. However the only function that actually gets called from my outside program code is the CalcHeuristic(char** state, int size)
function.
This function then calls the other functions itself.
Since these do not belong to a class my compiler will not let me declare the other functions as private
. Is there a way to do this? Should I even worry about it?