Advertisement

05.11.2008 at 10:24AM PDT, ID: 23392876
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Compiling different section of code

Tags: c++ c
hi there,
I hope I'll be clear. Is there a way to tell the compiler to compile or not compile sections of the code using some kind of "IF" for compilers?

10x
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: kulpem
Solution Provided By: evilrix
Participating Experts: 3
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
05.11.2008 at 10:33AM PDT, ID: 21543005

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.11.2008 at 12:43PM PDT, ID: 21543273

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.11.2008 at 12:54PM PDT, ID: 21543297

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.11.2008 at 12:56PM PDT, ID: 21543301

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.11.2008 at 12:58PM PDT, ID: 21543311

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 06:20AM PDT, ID: 21546700

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 06:27AM PDT, ID: 21546761

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 06:35AM PDT, ID: 21546830

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 06:37AM PDT, ID: 21546842

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 07:21AM PDT, ID: 21547224

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 07:47AM PDT, ID: 21547441

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 11:40AM PDT, ID: 21549451

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 11:44AM PDT, ID: 21549488

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 09:10PM PDT, ID: 21579930

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.20.2008 at 03:23AM PDT, ID: 21604742

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.20.2008 at 03:29AM PDT, ID: 21604770

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
05.11.2008 at 10:33AM PDT, ID: 21543005

Rank: Sage

Use preprocessor directives, like #ifdef :-
http://www.cplusplus.com/doc/tutorial/preprocessor.html
http://www.cppreference.com/preprocessor/preprocessor_if.html
1:
2:
3:
4:
5:
#ifdef DEBUG
... debug code goes here
#else
... non-debug code goes here
#end
Open in New Window
Accepted Solution
 
05.11.2008 at 12:43PM PDT, ID: 21543273
I want much more control.

something Like

#ifdef (a parameter I pass to compiler)
 .... code
#else
.....code
#end
 
05.11.2008 at 12:54PM PDT, ID: 21543297
take from MSDN 2005
Microsoft Specific

The identifier can be passed from the command line using the /D option. Up to 30 macros can be specified with /D.

This is useful for checking whether a definition exists, because a definition can be passed from the command line. For example:

// ifdef_ifndef.CPP
// compile with: /Dtest /c
#ifndef test
#define final
#endif
 

END Microsoft Specific
Assisted Solution
 
05.11.2008 at 12:56PM PDT, ID: 21543301

Rank: Genius

>> #ifdef (a parameter I pass to compiler)

Most compilers allow to do that. With gcc for example you just add the flag -DDEBUG to set the DEBUG mode - which would make the #ifdef part executed.
 
05.11.2008 at 12:58PM PDT, ID: 21543311
well that's it
10x alot
 
05.12.2008 at 06:20AM PDT, ID: 21546700
kulpem,
 
evilrix has asked (http://www.experts-exchange.com/Q_23393175.html) for an explanation of why you selected the
answer(s) you selected for this question.
 
Please indicate your reasoning within the next four days.  I or another Moderator will check
back in about four days, at which time we expect to see your explanation.
 
To other participating Experts: please leave your recommendations as well.
 
After reviewing the explanation and other recommendations, the Moderator may decide to
change the award for the question.
 
Thank you,
 
modus_operandi
EE Moderator
 
05.12.2008 at 06:27AM PDT, ID: 21546761
well, the question was very simple and the other guy answer before hime. I checked the time and indeed he beat him by 2 minutes
 
05.12.2008 at 06:35AM PDT, ID: 21546830

Rank: Genius

I'm not evilrix ;) He answered your original question (or at least part of it ...).
 
05.12.2008 at 06:37AM PDT, ID: 21546842

Rank: Sage

>> well, the question was very simple and the other guy answer before hime. I checked the time and indeed he beat him by 2 minutes
The original Q was answered by {http:#21543005}. All it stated was, "Is there a way to tell the compiler to compile or not compile sections of the code using some kind of "IF" for compilers?". There was then a follow up asking for more info, which was provided by {http:#21543297}. Together, both of these answered your original Q and your follow up Q.

It is to this end that I requested a moderator review the answer accepted. I do not disagree with the answer selected but it assisted rather than answered the original Q and, as such, I believe a point split would have been more appropriate.

-Rx.
 
05.12.2008 at 07:21AM PDT, ID: 21547224
so lets split it...
 
05.12.2008 at 07:47AM PDT, ID: 21547441

Rank: Sage

>> so lets split it...
That works for me.

modus_operandi, as per this discussion unless anyone objects I'd suggest PAQing {http:#21543005} and {http:#21543297}.

Thanks.

-Rx.
 
05.12.2008 at 11:40AM PDT, ID: 21549451
well open the question divide points as you want I'm out of here guys. if you have the time to argue about some virtual point go ahead and do it, I'm out.
 
05.12.2008 at 11:44AM PDT, ID: 21549488

Rank: Sage

>> if you have the time to argue
It's not a case of arguing, it about ensuing the PAQ database is correct... although ensuring you reward the experts who put in the effort to help you is also the right thing to do. We all volunteer so don't you think it is right to take just a little care when you close a question properly after we've given you our time to try and assist then you?
 
05.15.2008 at 09:10PM PDT, ID: 21579930
A request has been made in Community Support to close this question:
http://www.experts-exchange.com/Q_23393175.html

If there are no objections, a moderator will finalize this question in approximately 4 days as follows:
Split expert comments {http:#a21543005} & {http:#a21543297}

Please leave any recommendations here.

modus_operandi
EE Moderator
 
05.20.2008 at 03:23AM PDT, ID: 21604742
Force accepted.
Vee_Mod
Experts Exchange Moderator
 
05.20.2008 at 03:29AM PDT, ID: 21604770
kulpem,
It would be a really good idea for you to keep in mind that these folks are all volunteers.
They are helping you solve your problems - for free (kind of like your membership).

If you expect them to continue helping you solve your problems, you need to take an interest in proper resolution of all questions you ask.

Proper grading, points allocation - and btw - your 25% deletion rate really stands out as far above normal.

Vee_Mod
Experts Exchange Moderator
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628