basic question on namespaces

Let's say I have the following simple program:

1
2
3
4
5
6
7
8
#include <iostream>
#include <cmath>

int main()
{
	std::cout << "5.5 squared is " << pow(5.5,2);
	return 0;
}


I understand the basic reason for the std:: preface, but why am I required to use std:: in front of cout, but not in front of pow()? Is it because pow() comes from a C header file? Should I use std:: in front of pow() anyway?
Is it because pow() comes from a C header file?


Yes

Should I use std:: in front of pow() anyway?


You can. I try to. But it doesn't really matter.
Topic archived. No new replies allowed.