Forum: C++ Aug 28th, 2008 |
| Replies: 6 Views: 1,610 I think you maybe misunderstand the meaning of index and size. There are some errors in your code, please see my comments below. I attached my code, which is base on yours. Please refer to it. |
Forum: C++ Apr 28th, 2008 |
| Replies: 27 Views: 3,924 for (int k = 0; k < rowsb; k++)
{
sum = sum + matrixa[i * columnsa + k] * matrixb[k * columnsb + j];
matrixc[i * finalcolumn + k] = sum; //move this line out of this loop then use j replace k,... |
Forum: C++ Apr 28th, 2008 |
| Replies: 27 Views: 3,924 Sorry, my English is not so good. I mean that using
one_dimensional_array[i*column + j]
instead of
two_dimensional_array[i][j] |
Forum: C++ Apr 28th, 2008 |
| Replies: 27 Views: 3,924 for (int i=0; i<rowsa; i++)
{
for (int j=0; j<columnsb; j++)
{
float sum = 0.0;
for (int k=0; k<columnsa; k++)
{
//first, look it as a two-dimensions array,... |
Forum: C++ Apr 25th, 2008 |
| Replies: 3 Views: 568 I have finished it, but to don't violate the rules of this website --"Don't give away code" , I can not give you all my source code. The following is the framework of program. hope it can help you.
... |
Forum: C++ Apr 18th, 2008 |
| Replies: 11 Views: 1,519 The various combinations of the flags and the corresponding meaning as below:
ios_base Flags Meaning
in Reads (file must exist)
out ... |
Forum: C++ Apr 16th, 2008 |
| Replies: 10 Views: 2,322 int len = strlen(sentenceHolder1);
for(int i = 0; i < len; i++)
{
if( sentenceHolder1[i] == look_for_character )
sentenceHolder1[i] = sentenceHolder1[0]; //I think this will be OK
}... |
Forum: C++ Mar 10th, 2008 |
| Replies: 7 Views: 831 Could you post your source code. |