Your first example is ALMOST how to multiply two arrays. A does not exist in an array with 100 elements. you have to create a loop and multiply each array element in array A by the corresponding element in array B. Then the result has to be stored someplace, either in array C, or back in A or B. Afterall, if the result isn't stored someplace there is no point to doing the math.
I don't really understand the question -- but there is no magical way to multiply two arrays. c++ does not support matrix algegra like you would see in a math class. You have to code the loops yourself, unless you want to buy (beg, borrow or seal :cheesy: ) it from somebody else.
You need to be WAAAAAAAY more clear. Multiplication of two integers or floating point approximations is well-defined and everybody knows what you mean. Multiplication of arrays is not.
Do you want to make a multiplication table? That's one interpretation, and since you mentioned a two-dimensional array, that seems possible. However, there are other interpretations, such as dot product, or piecewise product. Or do you wish to perform matrix multiplication?
Unless you better explain what type of multiplication you want to do, you're not going to get a good answer.
But there should be some way.
If we can use pointer in the place of array is it possible
You are writng c or c++ program NOT fortran. If you want the compiler to do high-level math then use a fortran compiler, which will PROBABLY do what you want (I don't know and don't care! :) ). When you write c and c++ code there are many things the compiler does NOT do for you -- you have to do them youself or get libraries where someone else did all the work for you.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.