Thread: help with external structure

  1. #1
    Registered User
    Join Date
    Jun 2011

    help with external structure

    so I have main.cpp x.cpp x.h y.h and y.cpp files.

    in my x.h, I #include "y.h" at the start and declare my struct List.
    Inside my struct, there are some functions.

    in my y.h header file, I have another struct Line with one function.

    The functions in my x.h files are implemented in my x.cpp file.

    in one of the function, I want to call a function in my y.h file.
    Can someone please tell me how can I call that function please.

    Nvm, I figured that out. I need to include a struct in my x.cpp file
    Last edited by byebyebyezzz; 06-10-2011 at 05:19 PM.

  2. #2
    Join Date
    Oct 2007
    Inside my computer
    Separate the implementations to your .cpp files and include appropriate header files in the source files to get access to the declarations.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 04-25-2010, 10:57 AM
  2. Automatic variables in external structure definition
    By Boxknife in forum C Programming
    Replies: 2
    Last Post: 06-23-2008, 12:56 PM
  3. external structure declaration
    By aze in forum C Programming
    Replies: 5
    Last Post: 04-16-2004, 04:27 PM
  4. Keeping track of static external structure
    By pwilfred in forum C Programming
    Replies: 6
    Last Post: 03-13-2003, 06:23 PM
  5. External structure?
    By mart_man00 in forum C Programming
    Replies: 3
    Last Post: 09-08-2002, 07:42 PM