Reputation: 29
while finding the inverse of matrix using boost library, when I try to use this
using namespace boost::numeric::ublas;
then the compiler shows an error that
there is an ambiguity as there is a vector class also in boost library.
Any suggestions on how to overcome this.
Upvotes: 0
Views: 547
Reputation: 227400
This is the kind of problem that you can expect from using directives. The best solution is to simply not use them. You can mitigate the scope for errors by using them in very limited scopes (e.g. inside function definitions). Alternatively, you can use namespace aliases to make your code more concise. For example,
namespace ublas = boost::numeric::ublas;
Upvotes: 3