Re: Question: Compiling straight c++ in Visual studio 2010 express c++

  • From: Tyler Littlefield <tyler@xxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sun, 27 Jun 2010 21:29:39 -0600

std is just a namespace. some people use the using std, but I don't. Namespaces 
are to categorize code. So for example, your game engine might be in a gamelib 
namespace. That would effectively make any variables, lcasses, functions and 
etc declared there fall under that namespace, so using gamelib::myfunc() will 
call the myfunc from gamelib's namespace. Just using myfunc (assuming you 
haven't done 'using namespace gamelib), will call your function. It's great to 
avoid naming colitions.
                Thanks,
Tyler Littlefield
        http://tds-solutions.net
        Twitter: sorressean

On Jun 27, 2010, at 8:30 PM, qubit wrote:

> what about the "using std" spec?
> Interesting.
> 
> ----- Original Message ----- 
> From: "Tyler Littlefield" <tyler@xxxxxxxxxxxxx>
> To: <programmingblind@xxxxxxxxxxxxx>
> Sent: Sunday, June 27, 2010 6:33 PM
> Subject: Re: Question: Compiling straight c++ in Visual studio 2010 express 
> c++
> 
> 
> I lied, I should've been clearer. that's your main func. Hello world is:
> #include <iostream>
> int main(int argc, const char* argv)
> {
> std::cout << "Hello world!" << std::endl;
> return 0;
> }
> What I said in the other message still applies, though.
> HTH,
> 
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
> 
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
> 

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: