I saw the code below in this answer to What is your favorite C programming trick?
What does this piece of code do? How is it useful?
double normals[][] = {
#include "normals.txt"
};
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This uses the preprocessor to initialize an array.
It’s basically inlining the code that populates the array with values, by reading it from an external text file. Note that this requires that “normals.txt” be filled with values that match the C syntax, ie: