Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6357407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:09:34+00:00 2026-05-24T23:09:34+00:00

I have to use a header file after the program is compiled. This header

  • 0

I have to use a header file after the program is compiled. This header is downloaded from a server due to a client petition. Inside the header there are 3 arrays and 1 int that I would like to read during execution.

My first solution is to write a parser. The header files always have the same pattern so I could write 4 lines to read the arrays and the int.

Is there any other solution? Perhaps a dynamic include and a precompiled header, ho knows.


This is the full explanation:

I’m developing a native Android application using Qualcomm AR SDK.

One technique to use your own 3D models is using this perl script: http://heikobehrens.net/2009/08/27/obj2opengl/. Basically you need 2 files: a header with vertices, normals and texture coordinates, and the texture. The above script can generetate this header from a .obj file.

Ok, now you have both files ready to use in native C/C++ to render the model. You can COMPILE this header and include it anywhere you want in your application. But my application needs to download this header and texture when the user presses a button, for example. The texture it’s easy to read, but I also need to read the header at EXECUTION time. Because I am not a C/C++ expert I asked here if there was a chance to link the header at execution time.

But now it don’t matter beacuse I’ve writed a parser so I can use the vertices, texture coords and normals at execution time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:09:35+00:00Added an answer on May 24, 2026 at 11:09 pm

    C++ is (usually) a statically compiled language. You compile it, and get some executable code out, which you can run. The two stages, before and after compilation, have nothing to do with each others. At compile-time, you deal with C++ source code only.

    And at runtime, you deal with a single compiled program, generated from all the source code.

    There is generally no way to “add” source code to a program once it has been compiled.

    (I’m simplifying a bit here, I hope the nitpickers will forgive me)

    What you need to do instead is treat that “header” as data, not code.

    It is a data file containing three arrays and an int. You need to write your program to open that file, read its contents, parse it, and carry out the actions necessary.

    To do that, you’ll need to look into file I/O to load the file, string manipulation to process its contents, and then some logic to create the variables to hold the data specified in the data file.

    But you can’t just “plug in” new code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a c++ header file containing a class. I want to use this
i have to fix the header in a gridview and i use this in
I currently have a program that basically reads html from a webpage. After sending
I wanted to use the custom field for wordpress to have a different header
I use this trivial function to calculate the CRC checksum of a given file:
I'm trying to use a post form to generate an excel file after choosing
I have a header file that has some static variables for all of my
I have declared a DLL import in my C# program that looks like this:
I have use IlMerge to merge all the dlls of my projects in one
I have use include ('base.php') script in my other scripts ( more.php ). Now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.