creating breaks in programs

I want to find out how to create breaks in programs so when I compile it I can done it in segment instead of the entire program file.

Comments

  • : I want to find out how to create breaks in programs so when I compile it I can done it in segment instead of the entire program file.
    :
    [green]you can divide your program into different source files (.c or .cpp). Make sure that you create header files for any functions used cross-module and to include those header files where appropriate. Also, include all the source files in your project.[/green]
  • : : I want to find out how to create breaks in programs so when I compile it I can done it in segment instead of the entire program file.
    : :
    : [green]you can divide your program into different source files (.c or .cpp). Make sure that you create header files for any functions used cross-module and to include those header files where appropriate. Also, include all the source files in your project.[/green]
    :

    Hi,

    You can do this:

    CLog.cpp
    ----------------------------------------

    #ifdef _DEBUG

    CLog::CLog()
    {
    // This code and funtions only work in DEBUG_ mode
    }

    CLog::~CLog()
    {
    }

    #elseif

    CLog::CLog()
    {
    // This code and funtions only work in not DEBUG_ mode (Release)
    }

    CLog::~CLog()
    {
    }

    #endif


    CLog.h
    ------------------------------

    same...

    #ifdef _DEBUG
    ....
    #elseif
    ........
    #endif


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories