home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-

New Paste :: Recent Pastes:: Add Line Numbers

using in a local namespace by glDaher
// example on "using" in a local scope...

#include <string>
#include <list>

namespace mynamespace
   using std::list;
   using std::string;

   void blah( string )
       {// do something


// usage somewhere out

void main()
    mynamespace::string str = "nice string";


// this way, implementing the string class in your namespace
// will not affect out side usage of your namespace...
// maybe you wont create a string class but other classes, who knows?
// it's up to you, I myself would like my code to be as generic as possible :)

// glDaher