Structures

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Verne

    #1

    Structures

    Has anyone else read Teach Yourself Borland C++ Builder in 14 or 21
    Days and on pages 60-62 tell me what to do with a Structure called
    STRUCTUR.H.

    I've gotten along fairly well until I hit this but just don't
    understand where I must place the structure so it's recognized.
    Please.
    Verne
  • Alan

    #2
    Re: Structures

    I like to place the structure right below the preprocessor directives,
    like this:

    #include <iostream>
    using namespace std;

    struct book
    {
    int var;
    int var2;
    };

    //prototypes

    //main function
    int main()

    Works perfectly fine like this.

    Comment

    Working...