Structure of a C++ program.

This is a discussion on Structure of a C++ program. within the C++ Programming forums, part of the General Programming Boards category; What is the 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,068
    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,893
    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,475
    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, 08:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21