I am writing a program. The code, that part on which breaks:

int main() { int *x; x[0]=1; } 

It gives an error when performing:

 Run-Time Check Failure #3 - The variable 'x' is being used without being initialized 

What am I doing wrong?

    2 answers 2

    Pointer you created, and where is the memory allocation?

    • Exactly) Thank you very much, it’s necessary, for a long time, I haven’t just written anything - Tanechek

    And what should this “prog” do? In this edition there is an attempt to write int (1) at an unknown address.

    • No, I just inserted a piece here where it broke. In general, as a result, it is necessary to program the first Gaus interpolation formula for equidistant nodes. - Tanechek Nov.