none
i have a problem how to give an array a size using cin object RRS feed

  • Question

  • #include <iostream>

    #include <conio.h>

    using namespace std;

    void main()

    {

        unsigned int size;

     cout << " enter a size for 1D ARRAY " ;

    cin>>size;

    int arr[size]; // in this step there is a error expression must have a  constant value 

    _getch();

    }

    Tuesday, June 9, 2015 12:09 PM