combining 2 arrays

This is a discussion on combining 2 arrays within the C++ Programming forums, part of the General Programming Boards category; can anyone tell me why I am crashing when i run this ?
I am loading and then trying to ...

Re: combining 2 arrays

Originally posted by mouse163

Code:

#include <iostream>
using std::cout;
using std::cin;
using std::cerr;
using std::endl;
using std::istream;
using std::ostream;
using std::ios;
#include <fstream>
using std::ifstream;
using std::ofstream;
#include <iomanip>
using std::left;
using std::right;
using std::setw;

Seems a lot of people do this for some reason. I would hate to have to type out all of those "using"s. All you need to put is "using namespace std;" and it will include everything in the std namespace. For more on namespaces in C++, http://faq.cprogramming.com/cgi-bin/...&id=1043284351

I have never run into a situation where that is the case, and it would work for your situation. Could someone else please tell me when this might be the case? As I understand it, if it's in the std namespace, it's included using "using namespace std;". Am I wrong?

Re: Re: combining 2 arrays

Originally posted by HaLCy0n Seems a lot of people do this for some reason. I would hate to have to type out all of those "using"s. All you need to put is "using namespace std;" and it will include everything in the std namespace. For more on namespaces in C++, http://faq.cprogramming.com/cgi-bin/...&id=1043284351

you could. i prefer not to though because of global pollution. but that's my preference.