Don't!
You are mixing up different concept and issues.
First: the code you post contains ERRORS not BUGS (there is a subtle difference: an
error is something the violates the language syntax, that makes your code not translatable into machine code. A
bug is a "logical mistake" that doesn't violate the language rules: simply you tell the machine to do something different than what you think).
Actually you cannot debug it because you have nothing (yet) to debug.
Second: don't consider long error sequences: an error can make the parser to be fooled about the meaning of the next text sequence. Correct the errors one at time and recompile, and see how the error list changes.
Third: We cannot fix a code if we don't know what that code is intended to do.
For example: you have an
int* x;
that is assigned as
x = new float [0];
Apart the nonsense of
float[0]
, you are trying to treat as
int
what is allocated as
float
. This is incongruent, but what is the correction? change all to int, or all to float? It depends on what you want to do.
Four: you have
while cin>>x[i]
.
The correct syntax for while is
while(condition) statement
The missing () makes the compiler parser to loose about how the next statement should be interpreted. hence the following errors are not accurate.
You should correct one by one and recompile until all the syntax had been adjusted.
At that point you have a program that can be executed, and -probably- don't behave as you want to.
At that time you must debug it to see what, in fact, goes on while statements are executed and variables assigned.
Now, can you edit the question, perpending a brief explanation on what you want that code to do?