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,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    How is A defined?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice