Basics in c++

Discussion in 'C++' started by isha_1, Dec 18, 2009.

  1. isha_1

    isha_1 New Member

    Joined:
    Dec 16, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,358
    Likes Received:
    383
    Trophy Points:
    83
    Same. There is no difference when it comes to syntax to an extent.
     
  3. isha_1

    isha_1 New Member

    Joined:
    Dec 16, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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 ?
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,358
    Likes Received:
    383
    Trophy Points:
    83
    Both can be done and it depends on your real world example. There is as such no restrictions from language point of view.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice