Blue Theme Orange Theme Green Theme Red Theme
 
Nevron Gauge for SharePoint
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

Header files: Multiple Inclusion problem - Solution B

 by Sivaraman Dhamodaran on Jan 10, 2012

In this blog we will look at the #Pragma Once. It is nice alternative for the Solution A given in the previous blog
Comments: 0 Views: 879 Printable Version 

Oh! That's simple. You no need to use the #define, #ifndef & #endif set of directives. Instead of that you  should just use #pragma once pre-processor directive. And it will take care of every thing. Below is sample by making small change in the extendedmath.h

 

#pragma once

#include "SimpleMath.h"

int Add_three_numbers(int, int, int);

 

int Add_three_numbers(int a, int b, int c)

{

            return ( Add_Numbers(a, b) * c );

}
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
Team Foundation Server Hosting
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Systems Engineer
Joined: Oct 21, 2010
Education: Masters Degree
 More Blogs from this Blogger
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
Header file inclusion techniques
View all »
 Latest Blogs
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
The Euclidean Algorithm
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.