Class and vector related question

So I am trying to call call the function:

1
2
3
vector<vector<int>> Board::GetSolutions() {
	return Solutions;
}


I am trying to call it here, and do not know how to call it, or make it cout anything.

1
2
void Board::Solve()
{Board GetSolutions(10);}//this line is what I need to edit 



The main function then calls my void solve function:

B.Solve();


For reference, Board is a class that contains the following code:
The class is contained in its' own header file, and has appropriate headers to be linked to my function file and to my main.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Board {
public:
	Board(int BoardSize); // constructor takes the board size as input 
	void Solve();
	vector<vector<int>> GetSolutions();
	void PrintSolutions();

	// add any additional public members below........

private:
	int N; // Private variable to keep board size
	vector<int> Column; // A temporary assignment; Column[i]=j means queen placed at row i, column j
	vector<vector<int>> Solutions; // Set of all solutions

	// add any additional private members below........  
Last edited on
So I isolated my problem a little more. Basically, my function is a void function. I cannot change that. Since it's all void functions, how can I write anything meaningful in the "solve" section? (Something that will be passed down somewhere, in a function I can create or in an existing function defined in the class above)... Thank you, I am so lost...
Topic archived. No new replies allowed.