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

  • SEARCH
  • Home
  • 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 7799527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:20:22+00:00 2026-06-02T00:20:22+00:00

Coming from the Java world, in which there are no typedefs, I have a

  • 0

Coming from the Java world, in which there are no typedefs, I have a question for C++ developers:

My task is to rewrite a large MATLAB project in C++. In order to get to know the structure of the code, I have started rebuilding the module and class structure without actually implementing the functionality.

I know that I frequently need classes/types like Vector and ParameterList, which will be provided by some framework I have not decided on yet.

So I created a central header file Typedefs.h in which I have type definitions like

typedef void Vector; // TODO: set vector class
typedef void ParameterList; // TODO: set parameter list class

For now, these are set to void, but I can use these types to write class skeletons and method signatures. Later I can replace them with the actual types.

Is this something that makes sense? If yes, is there a way to avoid manually including the Typedefs.h in every file?

  • 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-06-02T00:20:23+00:00Added an answer on June 2, 2026 at 12:20 am

    I doubt this would work, unless you use, for example Vector*. You wouldn’t be able to have Vector objects or parameters, so it’s pretty much pointless.

    And for use as a pointer, you can very well do a forward declaration.

    Anyway, I don’t really see the need for any of this. You can declare an empty class without having to implement it, and it’s even easier to write than a typedef:

     typedef void Vector;
    

    vs

     struct Vector{};
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Coming from the basic Java world I know there's a way to spawn a
I'm coming from the Java world and are building a small c++ program at
I'm brand new to java, coming from a ruby world. One thing I love
I am coming from Java and am currently working on a C# project. What
I'm starting with Python coming from java. I was wondering if there exists something
I'm coming from .NET world, and unfortunately looking Java source with .NET 's eyes.
I'm coming from the Java world and reading Bruce Eckels' Python 3 Patterns, Recipes
Background: I am comming from the Java world and I am fairly new to
Coming from Java , I'm used to the package structure (com.domain.appname.tier) Now I've started
I'm coming from Java/C++ to Ada and am having trouble figuring out the small

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.