Can i make this with out "using namespace std;"

sir can make the this with out using namespace 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()
{
	using namespace 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;
}
Yes. Use std::cout and std::cin to refer to cout and cin.
You could also do

1
2
using std::cout;
using std::cin;
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;
}
Topic archived. No new replies allowed.