Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
array in C
Name: leon Date: January 8, 2003 at 13:30:19 Pacific OS: xp CPU/Ram: 1.2G/256
Comment:
Hi, i have a problem with my array. i got a 2d array. array[49][14]. i need to find out the value of something like this: array[0][j]*0+array[1][j]*1+array[2][j]*2+...+ array[48][j]*48, where the value of j goes form 0 to 13 (that is sum of each elements in the array times the x coordinate of the array) . i write a code using for loop. but i keep getting 0. i think my code is wrong. would anyone please take a look at it? thanks!
sum_zx = 0; for (i=0; i < 49; ++i) for (j=0; j < 14; ++j) sum_zx = sum_zx + j*array[i][j];
Summary: Hi, I don't know how to do the following because I don't know how to use the string array in C++. Please Help!!! Thanx! #include <iostream.h> #include <string.h> class pizza { private: char**...
Summary: I've been trying to make a vector of arrays in c++: vector<char[16]> but, apparently, that doesn't work. So, I've been trying to figure out how to make vector<vector<char> > but I need the c...
Summary: Hello, I've got a problem putting together dynamic arrays in C. I can do it fine in C++ but I've never had any real instruction in C and all of this malloc() business isn't getting through to me. Her...