|
-
February 14th, 2011, 08:03 AM
#1
just for info
hi all, 
Can anyone tell me the difference between using directive and using declaration? (with syntax as an example) 
thanks!!!
-
February 14th, 2011, 08:08 AM
#2
Re: just for info
A using directive:
Code:
using namespace std;
A using declaration:
-
February 14th, 2011, 08:46 AM
#3
Re: just for info
thanks laserlight 
but every time, it confuses me, what are those #define statements are?? i mean in what sense does it called and used for?
-
February 14th, 2011, 09:31 AM
#4
Re: just for info
I call those preprocessor directives, as does gcc
-
February 14th, 2011, 11:56 AM
#5
Re: just for info
ok, 
i want to ask another question and is: a class is basically, a data type that user defines then when a a variable is declared with some data type. So, what would be the difference? how to define a class?
thanks
-
February 14th, 2011, 12:12 PM
#6
Re: just for info
 Originally Posted by Aashi
what would be the difference?
The difference between what? using statements and classes? #defines and classes? All three of those are totally unrelated things. There isn't really a comparison to be drawn.
It's like asking what's the difference between the color yellow and a cement truck.
-
February 14th, 2011, 12:14 PM
#7
Re: just for info
 Originally Posted by Aashi
i want to ask another question and is: a class is basically, a data type that user defines then when a a variable is declared with some data type. So, what would be the difference?
Sorry, I don't understand your question.
 Originally Posted by Aashi
how to define a class?
You gave such an example yourself in this thread: access private data members.
-
February 14th, 2011, 01:20 PM
#8
Re: just for info
 Originally Posted by lindley
it's like asking what's the difference between the color yellow and a cement truck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|