Thread: Integer Emulation

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654

    Integer Emulation

    In response to cpjust and King Mir and my own style, I fiddled with creating this class in response to fulfilling everyone's needs.
    The goal was to get rid of get/set for every variable to make it easy to access and set and get, while still maintaining the advantages of a set/get.
    Hence, here is a integer/floating emulation class.
    All other operators are implemented, as well as a logging variable. I also created a thread-safe version (using Critical Sections) of the class.
    I imagine there are quite a few bugs left in the implementation, though. And besides from the missing operator, there is no logging (though it is supported).

    Now, those who wish can help to perfect this utility and all can be happy
    There are two files:
    CPPType.h -> contains the definition of the CCPPType (not thread safe) and CThreadCPPType (thread safe) class.
    CPPTypeImpl.h -> contains the actual implementation.
    Last edited by Elysia; 03-17-2008 at 05:11 AM.
    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. memory issue
    By t014y in forum C Programming
    Replies: 2
    Last Post: 02-21-2009, 12:37 AM
  2. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  3. Looking for constructive criticism
    By wd_kendrick in forum C Programming
    Replies: 16
    Last Post: 05-28-2008, 09:42 AM
  4. No Match For Operator+ ???????
    By Paul22000 in forum C++ Programming
    Replies: 24
    Last Post: 05-14-2008, 10:53 AM
  5. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM