1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error C2440

Discussion in 'C++' started by icechef, Feb 22, 2009.

  1. icechef

    icechef New Member

    Joined:
    Feb 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0

    cout <<
    "What specification would you like to view "; // Displays A Task Title.
    cin >> Z; // Stores Entered Values.
    A = new (nothrow) int[Z]; //
    if (A == 0) //
    cout << "Error"; //
    else
    for (Y=0; Y<Z; Y++) //
    cout << A [Y]<< ""; //

    keep getting this error and just cant work it out any pointers its to do with the 3rd line down

    error C2440: '=' : cannot convert from 'int *' to 'int *[10]'

     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    How is A defined?
     

Share This Page