Thread: making a class only get constructed once

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    It's not to hinder; it's to catch mistakes.
    I could easily make it throw an exception, but at this point, I didn't think it was necessary.
    Or is it necessary in your opinion? Or perhaps simply returning NULL?
    Well, returning NULL doesn't hurt, so let's add it as a good measure.

    Meh. Not such a good design, since you can't rely on it returning NULL, it at least it catches your mistakes in Debug mode.
    Last edited by Elysia; 04-13-2009 at 12:13 PM.
    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. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  4. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM