I used a simple for loop in a program ie (int i =0 ; i<x ; i++) , but now i need to use the value of i avter the incrementation for another equation and i get the "i hasn t been declared in this scope" error. why does this happen ? doesn't the previous declaration count ? thanks