line 28, you assined y=0 but checking it for 7 at first do while no input was given to y, btw if u wana have password, save some password/s in file in bin form then write to char and compare with user input..more security
That may be true, but that does not invalidate the fact that it can lead to naming conflicts.
What happens if you have a variable named count and you try and store the value of the number of 1's in an array?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
#include <algorithm>
usingnamespace std;
//program to count the number of 1's in an array
int main()
{
int count = 0;
size_t const size = 10; //size_t = std::size_t
int array[size] = {1, 2, 3, 4, 1, 1, 7, 8 ,1, 1};
count = count(array, array+size, 1); //error: can't use count as a function
//the working solution would be 1) remove the namespace
//or 2) add :: before the function
//http://www.cplusplus.com/reference/algorithm/count/
std::cout << count << std::endl;
}