Howdy, Stranger!

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

Categories

creating breaks in programs

posthimposthim Member Posts: 15
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

  • rollerolle Member Posts: 115
    : 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]
  • davidisladavidisla Member Posts: 12
    : : 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


  • Shawn CarterShawn Carter Member Posts: 0

    ______ ( http://forcoder.org ) free video tutorials and ebooks about [ Scratch PL/SQL Objective-C C++ C Java JavaScript Perl Ruby Swift Delphi Visual Basic C# Go Visual Basic .NET MATLAB Assembly Python PHP R ABAP D Clojure LabVIEW Rust Hack Bash Julia SAS Scala Lua Crystal FoxPro Prolog Logo F# Fortran Scheme ML Ada Erlang Kotlin COBOL Awk Lisp Alice Apex Transact-SQL VBScript Dart ] _

Sign In or Register to comment.