Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > difference between a namespace and class with just default constructor

Reply
Thread Tools

difference between a namespace and class with just default constructor

 
 
BigBrian
Guest
Posts: n/a
 
      01-18-2006
Youssef Mesri wrote
> What is the difference between these two situations
>
> 1- hold a namespace which contains justs some functions
>
> namespace MyNamespac
>
> void foo1()
> void foo2()
> void foo3()
> void foo4()
> ..
>
>
>
>
> an
> 2- hold a class within just a default constructor
>
> class Myclas
>
> public
> Myclass() {}
> void foo1()
> void foo2()
> void foo3()
> void foo4()
> ..
>
>
>
> Thanks in advance for your answer
>
> Yous
>

In addition to what others have said, namespaces are also open, the
can be spread across files. For example you can do thi

//file
namespace Fo

void f1() { /* do something */


// file
namesapce Fo

void f2() { /* do something */


You can't do this with a class

 
Reply With Quote
 
 
 
 
Default User
Guest
Posts: n/a
 
      01-18-2006
Earl Purple wrote:

> Victor Bazorov wrote:
> [quote]



> [end of quote]



This would be more readable if you used the actual Google quoting
mechanism. See .sig below.



Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
 
Reply With Quote
 
 
 
 
Earl Purple
Guest
Posts: n/a
 
      01-18-2006

Default User wrote:
> Earl Purple wrote:
>
> > Victor Bazorov wrote:
> > [quote]

>
>
> > [end of quote]

>
>
> This would be more readable if you used the actual Google quoting
> mechanism. See .sig below.
>
>
>
> Brian
>
> --
> Please quote enough of the previous message for context. To do so from
> Google, click "show options" and use the Reply shown in the expanded
> header.


I know what to do was waiting a lifetime for the form to come up. I
blame the programmers - obviously it wasn't written in standard C++.

 
Reply With Quote
 
JustBoo
Guest
Posts: n/a
 
      01-18-2006
On 18 Jan 2006 11:59:35 -0800, "Earl Purple" <(E-Mail Removed)>
wrote:
>> Please quote enough of the previous message for context. To do so from
>> Google, click "show options" and use the Reply shown in the expanded
>> header.

>I know what to do was waiting a lifetime for the form to come up. I
>blame the programmers - obviously it wasn't written in standard C++.


You don't have to use Google.

http://www.forteinc.com/main/homepage.php

They have a free version that is very good.

--
Solitary trees, if they grow at all, grow strong.
Winston Churchill
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      01-18-2006
Earl Purple wrote:

>
> Default User wrote:


> > Please quote enough of the previous message for context. To do so
> > from Google, click "show options" and use the Reply shown in the
> > expanded header.

>
> I know what to do was waiting a lifetime for the form to come up. I
> blame the programmers - obviously it wasn't written in standard C++.


Yeah, I saw in other messages that you were using the usual quote
mechanism there. Google's a tough newsreader, I had to use it for about
four months in the early part of 2005. I feel your pain.




Brian
 
Reply With Quote
 
Earl Purple
Guest
Posts: n/a
 
      01-19-2006

JustBoo wrote:
>
> You don't have to use Google.
>
> http://www.forteinc.com/main/homepage.php
>
> They have a free version that is very good.


This is getting O/T but from work google is the easiest (and possibly
only) option.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A constructor calling another constructor (default constructor)? Generic Usenet Account C++ 10 11-28-2007 04:12 AM
How to call default constructor from other constructor of the same class? romayankin@gmail.com C++ 9 03-06-2006 09:30 PM
procedure to add web reference which will not create new namespace just add class in existing namespace. Deep Mehta via .NET 247 ASP .Net Web Services 2 05-31-2005 05:05 AM
Invoking templatized base class constructor from templatized derived class constructor mrstephengross C++ 5 05-18-2005 07:12 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM



Advertisments