Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How to convert an array in matrices in C++ ?

+2 votes
asked Dec 26, 2022 by 22CSB0A12 Abhishek Singh (140 points)

1 Answer

+1 vote
answered Dec 27, 2022 by Peter Minarik (87,340 points)

An array is a one-dimensional matrix already.

int array[5];
int matrix[5][1];

The above two are (mathematically) equivalent.

What exactly are you after?

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...