sir can make the this with out usingnamespace st; it possible but i am not know i can make this please help me:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
#include <string>
int main()
{
usingnamespace std;
int number, count = 0;
cout << "Enter a number: ";
cin >> number;
for (; number != 0; ++count)
{
cin >> number;
};
cout << "Total of " << count << " inputs.\n";
system("pause"); // I'm aware that this way is very bad
return 0;
}
Yup most DEF, You can use "STD::" like what they said above. An EXAMPLE:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
#include <string>
int main()
{
int number, count = 0;
std::cout << "Enter a number: ";
std::cin >> number;
for (; number != 0; ++count)
{
std::cin >> number;
};
std::cout << "Total of " << count << " inputs.\n";
system("pause"); // I'm aware that this way is very bad
return 0;
}