| Topic: |
DEVELOP > c-Plus-Plus |
| User: |
"MaXiMuS" |
| Date: |
08 Nov 2007 03:51:45 AM |
| Object: |
This expr ?? |
Hi all,
-->> size *= (int)dims[j];
-->> retVal.m_vDims.push_back( dims[j] );
what do these two line of code mean? size is of type int.
thnks
.
|
|
| User: "Jim Langston" |
|
| Title: Re: This expr ?? |
08 Nov 2007 12:29:05 PM |
|
|
"MaXiMuS" <esunny@gmail.com> wrote in message
news:1194515505.434340.185040@s15g2000prm.googlegroups.com...
Hi all,
-->> size *= (int)dims[j];
*= is times equals.
a *= b;
is same as
a = a * b;
so this is
size = size * (int)dims[j];
If you can't figure it out from there, then you need to start back over from
page 1 of your book.
-->> retVal.m_vDims.push_back( dims[j] );
retVal is a structure or class.
It has some class/containter called m_vDims. maybe a vector.
it calls the functoin push_back of this instance. If it is a vector it is
pushing the value of dims[j] onto the vector at the end.
Start on page one of your book please.
.
|
|
|
|
| User: "Ian Collins" |
|
| Title: Re: This expr ?? |
08 Nov 2007 04:23:24 AM |
|
|
MaXiMuS wrote:
Hi all,
-->> size *= (int)dims[j];
-->> retVal.m_vDims.push_back( dims[j] );
what do these two line of code mean? size is of type int.
You jest? Do you have a C++ book?
--
Ian Collins.
.
|
|
|
|
| User: "Klaas Vantournhout" |
|
| Title: Re: This expr ?? |
08 Nov 2007 04:11:52 AM |
|
|
MaXiMuS wrote:
Hi all,
-->> size *= (int)dims[j];
-->> retVal.m_vDims.push_back( dims[j] );
what do these two line of code mean? size is of type int.
thnks
This depends on what retVal, n_vDims and dims are.
.
|
|
|
|
| User: "Jonathan Lane" |
|
| Title: Re: This expr ?? |
08 Nov 2007 04:39:26 AM |
|
|
On Nov 8, 9:51 am, MaXiMuS <esu...@gmail.com> wrote:
Hi all,
-->> size *= (int)dims[j];
this calls operator *= on size. Same as writing
size.operator*=( (int)dims[j]);
-->> retVal.m_vDims.push_back( dims[j] );
This calls the push_back function on a member of class retVal called
m_vDims. It passes in the result of calling operator[] on dims with a
parameter of j.
what do these two line of code mean? size is of type int.
thnks
.
|
|
|
|

|
Related Articles |
|
|