<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<DIV class=plainMail>Hi,</DIV>
<DIV class=plainMail>&nbsp;</DIV>
<DIV class=plainMail>I want to use the ublas.boost library to handle&nbsp;matrices&nbsp;which size is parametrized.&nbsp;</DIV>
<DIV class=plainMail>what I need is to be able to pass as a parameter the matrix's size to the constructor.&nbsp;Actually I am not using C++&nbsp;but SystemC (which is a C++ class for hardware description)&nbsp;</DIV>
<DIV class=plainMail>Why using uBlas? it is to be able to do some linear algebra operations&nbsp;easily and efficiently (scalar multiplication, adding two matrices, and maybe solving a linear system of equations).</DIV>
<DIV class=plainMail>&nbsp;</DIV>
<DIV class=plainMail>I have used this coding, which I found in the documentation but it gives errors.</DIV>
<DIV class=plainMail>&nbsp;</DIV>
<DIV class=plainMail>&nbsp;</DIV>
<DIV class=plainMail><FONT size=2>
<DIV>matrix&lt;</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2>&gt; m ();&nbsp;&nbsp; </DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> m_size;&nbsp; //my parameter for size</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>//and in my constructor:</FONT><FONT size=2><FONT size=2>&nbsp;</FONT></DIV>
<DIV>&nbsp;m.resize (m_size, m_size, <FONT color=#0000ff size=2><FONT color=#0000ff size=2>false</FONT></FONT><FONT size=2>);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>it&nbsp;fails with this error : <FONT size=1></DIV>
<DIV>: error C2228: left of '.resize' must have class/struct/union type</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>and with this one:</FONT></DIV><FONT size=2><FONT size=1>
<DIV>: error C2660: 'mcpx_boost::m' : function does not take 2 arguments</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>I am using Visual Studio 7.1 </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Does anyone know where is the problem?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>thanks for answering</FONT></DIV></FONT></FONT></FONT>
<DIV><FONT color=#008000 size=2><FONT color=#008000 size=2><FONT size=2><FONT size=1><FONT style="BACKGROUND-COLOR: #000000" size=2></FONT>&nbsp;</DIV></FONT></FONT>
<DIV><FONT color=#008000><FONT size=2><FONT size=1>&nbsp;</DIV></FONT></FONT></FONT></FONT></FONT></FONT></DIV></BLOCKQUOTE></td></tr></table><br>