Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Example of using preprocessor - 4 in different files

Posted By: Raimundo Fischer     Category: C Programming     Views: 4084

Example of using preprocessor - 4 in different files.

Code for Example of using preprocessor - 4 in different files in C Programming

//file1.h#define USD 1

//file2.h#define UKP 1

//file3
#include <stdio.h>
#include <file1.h>               //A#if !defined (USD) || !defined (UKP)      // B#error “ERROR: NO_CURRENCY rate is specified.”  //C#endif

 main()
{        
    int rs;
    rs = 10 * currency_rate;          //D
    printf (“%d\n”, rs);
}
  
Share: 


Didn't find what you were looking for? Find more on Example of using preprocessor - 4 in different files Or get search suggestion and latest updates.

Raimundo Fischer
Raimundo Fischer author of Example of using preprocessor - 4 in different files is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!