J
joshipura
Hello all,
I am new to C++.
Question #1: What the problem is:
============
I have Dev-Cpp 4.9.9.2 on Windows 7/64 bit.
I am trying out code from http://www.cplusplus.com/reference/vector/vector/data/ on it.
It fails with
main.cpp:42: error: 'class std::vector<int, std::allocator<int> >' has no member named 'data'
--->Is the website code wrong and there is no vector::data()?
--->Is the package of Dev-Cpp wrong?
--->Both?
Question #2: Why the problem is:
============
I need help in solving this for Sudoku solver program.
I store row, column and box as vectors and need to find an intersection of the trio.
As I understand from examples from http://www.cplusplus.com, in order to use std::set_intersection, I need to pass two arrays with lengths and a vector to store the difference.
This forces me to convert row, column and box into arrays using vector::data(), which fails.
--->Is there a way out without using vector::data()?
Thanks in advance!
I am new to C++.
Question #1: What the problem is:
============
I have Dev-Cpp 4.9.9.2 on Windows 7/64 bit.
I am trying out code from http://www.cplusplus.com/reference/vector/vector/data/ on it.
It fails with
main.cpp:42: error: 'class std::vector<int, std::allocator<int> >' has no member named 'data'
--->Is the website code wrong and there is no vector::data()?
--->Is the package of Dev-Cpp wrong?
--->Both?
Question #2: Why the problem is:
============
I need help in solving this for Sudoku solver program.
I store row, column and box as vectors and need to find an intersection of the trio.
As I understand from examples from http://www.cplusplus.com, in order to use std::set_intersection, I need to pass two arrays with lengths and a vector to store the difference.
This forces me to convert row, column and box into arrays using vector::data(), which fails.
--->Is there a way out without using vector::data()?
Thanks in advance!