473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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

Nov 8 '07 #1
4 1306
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.
Nov 8 '07 #2
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.
Nov 8 '07 #3
On Nov 8, 9:51 am, MaXiMuS <esu...@gmail.comwrote:
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

Nov 8 '07 #4
"MaXiMuS" <es****@gmail.comwrote in message
news:11**********************@s15g2000prm.googlegr oups.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.
Nov 8 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: JA | last post by:
I am trying to pull a time stamp out of a database,looks like this 2004-06-24 10:12:03 . Then I need to substring it so that I can take a difference of 2 times. Basically I making a clock...
14
by: Bart Nessux | last post by:
Could someone point me to documentation on this (and similar) signs used in Python: += Usage would be: x = += len(y) Literally, that's "variable x equals
7
by: steve bull | last post by:
I have the following code snippet to read the colorRange attributes for the colorRangeSwatch in the xml file listed below. string expr = "/swatches/colorRangeSwatch/colorRange";...
6
by: Sweety | last post by:
#include<stdio.h> void main() { int a=0,b=6,c=7,d=8,e; e = a ? c , b : c , d; printf("%d",e); } o/p->7
8
by: tsair | last post by:
In TextBox1 have string value as bellow: TextBox1.Text = "24-10*10/3" After the user press enter or tab key from TextBox1, the TextBox2 will get the result as 46.666 TextBox2.Text = 46.666
4
by: lisa | last post by:
I have an XML file that starts like this: <?xml version="1.0" encoding="ISO-8859-1" xmlns:fn="http://www.w3.org/2005/xpath-functions"?> <Authors> <Author> <ID>2</ID>...
9
by: seberino | last post by:
I understand that the web is full of ill-formed XHTML web pages but this is Microsoft: http://moneycentral.msn.com/companyreport?Symbol=BBBY I can't validate it and xml.minidom.dom.parseString...
11
by: nevergone | last post by:
Hello Everybody In <<Modern C++ Design>Compile-Time Assertions there is : template <boolstruct CompileTimeChecker { CompileTimeChecker(...); }; template <struct CompileTimeChecker<false{ };
0
by: NiteshR | last post by:
Hi. When i write a SELECT statement that returns a table with values, I am able to access the value individually using C#. When i write a SELECT statement that uses a COUNT(expr), I am unable to...
3
by: redcodeheaven | last post by:
Hello my teacher gave me an exercise to enter my name and 2 numbers the output must show the sum and the product of these 2 numbers and keep repeating the same procedure using a while loop till i...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.