to genarate random matrix where the elements of the matrix should be generated random

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • codefreak
    New Member
    • Oct 2014
    • 1

    to genarate random matrix where the elements of the matrix should be generated random

    I want to generate m*n matrix.m and n will be the user input. The elements of the matrix should be generated randomly.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You just need a dynamically allocated array.

    Read this: http://bytes.com/topic/c/insights/77...rrays-revealed

    and look at the last example.

    Comment

    Working...