what are uses of vectors in computer programming?
364031
in Java: Vector is used to store any kind of objects and its growing. you dont need to specify the size of it initially.\nand Vector is synchronized. use ArrayList instead of vectors if you want it unsynchronized.
60448
To use pointer with 2D matrix it is better to use pointer to a pointer. It can be used like usual 2D array.\nCode in main should be something like below\n//input dimension from user, m by n matrix\nint** matrix;\nmatrix=new int*[m];\nfor( i=0;i<m;i++)\nmatrix[i]=new int[n];\n// now input matrix from user in usual way.\n\nnow you can use this pointer to pointer as usual 2D array, when calling function just pass pointer to pointer as argument.\nI have said you how to raotate 2D array in your previous question. I'm just repeating procedures, not the code.\nFirst transpose the matrix and then reflect it wrt horizontal axis. I think this will work.
979648
C++ but its was used with api that the cmpany came up with so it pretty foreign to must people unless you have the source code and a book explaining the notation must companies now have a set of librays they use for this stuff
27985
You can add a Perl parser into a C++ program.  Many games do something similar to this; writing the game engine in C++ and scripting the AI using Perl.
910755
In mathematics, a matrix (plural matrices) is a rectangular table of numbers or, more generally, a table consisting of abstract quantities that can be added and multiplied. Matrices are used to describe linear equations, keep track of the coefficients of linear transformations and to record data that depend on two parameters. Matrices can be added, multiplied, and decomposed in various ways, making them a key concept in linear algebra and matrix theory.
837315
We don't actually use vectors in our every day lives, though we learn all about them during our flight training. As far as algebra II, we never do any math which is that complicated.
280948
I did C++ last year, but don't really remember it that much, so I found some websites that explain two dimensional arrays in C++:\nhttp://www.fredosaurus.com/notes-cpp/arrayptr/22twodim.html\nhttp://mathbits.com/MathBits/CompSci/Arrays/Matrix.htm\nhttp://library.thinkquest.org/C0111571/manual.php?tid=26\nhttp://www.cplusplus.com/doc/tutorial/arrays.html
676330
Displacement is a vector quantity.
4787
If you can work in C++, there are many set \nimplementations available in the standard template\nlibrary.  However, if you're working in C, you\ncan add functional/useful sets using just a small number\nof bitwise and logical operations.\n\nThe basic idea is that a set will be a bit vector,\nand element "i" will be at position "1<<i".\nFor small sets (say, up to 32 or 64), you can\nhold the sets in a scalar variable.  For larger\nsets, you'd need to create an array of scalars and factor\nthat into the accessing code.\n\nWith no error checking, and just for illustration,\nI've included a trivial example of using "bit vector"\nsets in C:\n\n#include <stdio.h>\n\ntypedef long set_t;\n\n#define clear_set(x)          (x=0)\n#define set_element(e, x)     (x |= (1<<(e)))\n#define is_element(e, x)      ((1<<(e)) & x)\n#define sizeof_set            (sizeof(set_t)*8)\n\nint\nmain()\n{\n    int i;\n    set_t s;\n\n    clear_set(s);\n\n    set_element(5, s);\n    set_element(15, s);\n    set_element(25, s);\n\n    printf("The set consists of [");\n    for (i=0; i<sizeof_set; i++) {\n        if (is_element(i, s)) {\n            printf(" %d", i);\n        }\n    }\n    printf(" ]&#92;n");\n    return 0;\n}\n\nWhen compiled and executed, it demonstrates that\nit correctly created a set with elements 5, 15, and 25.\n\n$ cc set.c\n$ a.out\nThe set consists of [ 5 15 25 ]
1065652
void main()\n{\ncout<<"no"<<"/t"<<"id.no"<<"/t"<<"name"<<"/t"<<"sex"<<"/t"<<"department";\ncout<<"1 001/98 sarafcomputerscience&#92;n";\ncout<<"your information";\ncout<<"your information";\ncout<<"your information";\ncout<<"your information";\n\n}\nif u want to get input at runtime try to input thr cin>> statement and get that output by cout statement
608853
Code written in C and it works in C++\n\n#include <stdio.h>\n#include <conio.h>\n\nvoid main() {\n     float f[5];\n     int   i[5];\n     int j;\n     clrscr();\n     printf("Please, enter five float numbers: &#92;n");\n     for (j=0;j<5;j++){\n scanf("%f",&f[j]);\n i[j]=(int) f[j];\n     }\n     printf("Float value&#92;n");\n     for (j=0;j<4;j++)\n printf("%2.2f&#92;n",f[j]);\n     printf("&#92;nInteger value&#92;n");\n     for (j=0;j<4;j++)\n printf("%d&#92;n",i[j]);\n\n     getch();\n}
740929
Without a little more context I can't say for sure but, most likely, it's just another way of asking for the vector sum. That's the one vector that is equivalent to adding up the directions and magnitudes of all other vectors in the problem.
1336
Besides large systems of equations, matrices are also useful to solve for efficient portfolios.  The relationships between various asset classes are grouped in a "covariance matrix".  The variance of the portfolio can be calculated using simple matrix multiplication of the covariance matrix and the allocation to the portfolio.\n\nAlso, matrices are used in optimization problems, and regression analysis.
181375
I would use a vector<double> to store the coefficients.\nAddition/subtraction are just coordinate-wise addition and subtraction of the two vectors. For multiplication you just add up products of coefficients. I would implement division by doing a long division with remainder.
444463
I don't even know what a vector space is and I'm in highschool, maybe you could dumb it down for them and use pictures, kids like pictures!
526760
go to the source - The Art of Computer Programming by Donald Knuth.  It is the bible of data structures.
253406
All you need to program in C++ is a compiler and notepage.\n\none of the more popular is located here: \n  http://www.delorie.com/djgpp/\n\nAs for examples there's TONS on the Net, a simple Google Search for 'C++ examples'  returned over 32,000 hits.