Skip to main content
added 26 characters in body
Source Link
Nithin
  • 1.1k
  • 8
  • 15

An example where using namespace std throws a compilation error because of the ambiguity of count, which is also a function in algorithm library.

#include <iostream>
#include <algorithm>

using namespace std;

int count = 1;
int main() {
    cout << count << endl;
}

An example where using namespace std throws a compilation error because of the ambiguity of count, which is also a function in algorithm library.

#include <iostream>

using namespace std;

int count = 1;
int main() {
    cout << count << endl;
}

An example where using namespace std throws a compilation error because of the ambiguity of count, which is also a function in algorithm library.

#include <iostream>
#include <algorithm>

using namespace std;

int count = 1;
int main() {
    cout << count << endl;
}
Active reading [<https://en.wiktionary.org/wiki/compilation#Noun>].
Source Link
Peter Mortensen
  • 31.6k
  • 22
  • 110
  • 133

An example where using namespace stdusing namespace std throws complilationa compilation error because of the ambiguity of count, which is also a function in algorithm library.

#include <iostream>

using namespace std;

int count = 1;
int main() {
    cout<<count<<endl;cout << count << endl;
}

An example where using namespace std throws complilation error because of the ambiguity of count, which is also a function in algorithm library.

#include <iostream>

using namespace std;

int count = 1;
int main() {
    cout<<count<<endl;
}

An example where using namespace std throws a compilation error because of the ambiguity of count, which is also a function in algorithm library.

#include <iostream>

using namespace std;

int count = 1;
int main() {
    cout << count << endl;
}
Source Link
Nithin
  • 1.1k
  • 8
  • 15

An example where using namespace std throws complilation error because of the ambiguity of count, which is also a function in algorithm library.

#include <iostream>

using namespace std;

int count = 1;
int main() {
    cout<<count<<endl;
}