Thread: Structure of a C++ program.

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    3

    Structure of a C++ program.

    What is the structure of a C++ program?
    Last edited by CrazYjoe; 10-04-2006 at 09:07 PM.

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Code:
    // Preprocessor Directives ( Optional )
    
    // Class Definitions and Function Prototypes or Definitions ( Optional )
    
    // Main Function
    
    // Function and Method Definitions if they aren't above the Main Function ( Optional )
    A suitably vague answer for a vague question, I'd say.
    Sent from my iPadŽ

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    And just a guideline too, ignoring that you can freely intermix those as long as the already-seen rule is observed, and also ignoring the possiblity of multiple files.

    Nah, the question doesn't have an answer, not even a vague one.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Read a book or better still write the hello world program. That gives you a C++ program in it's most basic form

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. program structure with select sockets
    By n3v in forum Networking/Device Communication
    Replies: 9
    Last Post: 06-03-2006, 06:34 AM
  2. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  3. Simple program structure.
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 05-15-2002, 04:36 AM
  4. Replies: 2
    Last Post: 05-10-2002, 04:16 PM
  5. structure program
    By prlove71 in forum C++ Programming
    Replies: 1
    Last Post: 03-08-2002, 09:01 PM