473,386 Members | 1,860 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,386 software developers and data experts.

Need help with vector matrix

I need to write a program that uses vectors to create a 2 dimensional array in which the user is prompted to input the dimensions of the matrix and then enter the elements one by one. Im having troubles figuring out how to take the numbers that the user types and enter it into the array. Any ideas?
Apr 3 '08 #1
1 1115
gpraghuram
1,275 Expert 1GB
I need to write a program that uses vectors to create a 2 dimensional array in which the user is prompted to input the dimensions of the matrix and then enter the elements one by one. Im having troubles figuring out how to take the numbers that the user types and enter it into the array. Any ideas?
You have to use cin to get the input from the user.
Go through this link to get an idea about the cin


Raghuram
Apr 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: LumisROB | last post by:
Is it possible to create matrixes with vector <vector <double >> ? If it is possible which is the element m23 ? You excuse but I am not an expert Thanks ROB
11
by: Micha | last post by:
Hello there, I think I've run into some classic c++ pitfall and maybe some of you guys can help me out. For my project I will need to use matrices and vectors and so I decided to implement them...
7
by: Loopy | last post by:
Assume I have (excuse possible unintended syntax errors) template <class T> class vector { .... void Add(const T &); ..... }
2
by: wuzertheloser | last post by:
Develop a program which computes the current value of the vector {x} based on the following forward iteration: {x}(n+1) = {x}(n), n = 0,1,2, ... ,8,9. In other words, the next vector {x} is...
1
by: raylegendkiller | last post by:
NEED TO MAKE A PROGRAM which computes the current value of the vectors {x} based on the following forward iterations: this >>> {x}(n+1) = {x}(n), n = 0,1,2, ... ,8,9. In other...
3
by: PolkaHead | last post by:
I was wondering if there's a way to traverse a two-dimensional vector (vector of vectors) with a nested for_each call. The code included traverses the "outer" vector with a for_each, than it...
1
by: Preben | last post by:
Hi, don't know if this is the correct group, but try anyway. I would like to use boostbindings from the boost sandbox together with my project where I use boost::numeric::ublas vectors and...
1
by: atomik.fungus | last post by:
Hi, I'm re-writting my matrix class to practice my programming and the computer doesn't let me compile the next code: ( this example come from the constructor of the class) //the matrix is made...
1
by: Peterwkc | last post by:
Hello all C++ expert programmer, i fairly new to C++ programming. I have designed a matrix class which uses vector to store the data. My problem is i want store the data into vector until user...
3
by: Pino | last post by:
HI all, I am learning c++ ( just 1 month) and would want an aid for a code. I have a integer vector of length N. ie 3 3 3 4 4 1
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.