Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Basics in c++ (http://www.go4expert.com/forums/basics-in-cpp-t20418/)

isha_1 18Dec2009 13:43

Basics in c++
 
Hi all
I am new to C++ , i have worked on C .But i am afraid to work on C++. I need all of your h
elp in this . please help me on the several questions i have:
1> In C i used to define struct in another directory , where we used to have all definitions of struct in struct directory we have lot of .h file conatining the definitions of struct .
then in our required application , i used to call struct name and declare the header file in the begibning of file there.
how it happens in C++ , where we write the calss definition? How is accessible from one .cpp file to anoter cpp file

shabbir 18Dec2009 18:19

Re: Basics in c++
 
Same. There is no difference when it comes to syntax to an extent.

isha_1 19Dec2009 08:23

Re: Basics in c++
 
Hi
Please can you be little more elaborative . I am asking not in theoretical sense , but from real time project point of view . The class creation , and other classes definition for friend , abstarct class, inheritance . Are they all defined in one file and later called from other files . or Only base class defined in one file , then in other files child class are created ?

shabbir 19Dec2009 09:27

Re: Basics in c++
 
Quote:

Originally Posted by isha_1 (Post 61902)
Hi
Please can you be little more elaborative . I am asking not in theoretical sense , but from real time project point of view . The class creation , and other classes definition for friend , abstarct class, inheritance . Are they all defined in one file and later called from other files . or Only base class defined in one file , then in other files child class are created ?

Both can be done and it depends on your real world example. There is as such no restrictions from language point of view.


All times are GMT +5.5. The time now is 22:24.