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 8837139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:39:03+00:00 2026-06-14T09:39:03+00:00

May I have a question as Why following code compile fail with error C2371

  • 0

May I have a question as “Why following code compile fail with error C2371 at line 04” ?

It succeeded on VS6 but failed on VS2008.

I’ve tried to comment out line 05, still have this compile error.

01   typedef struct tagAAA
02   {
03       unsigned char      a;
04   } AAA;

05   typedef AAA FAR* LPAAA;

Thanks in advance.

  • 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-14T09:39:04+00:00Added an answer on June 14, 2026 at 9:39 am

    Presumably, the compiler gave an error message as well as a code, which told you what the problem is. Googling the code reveals:

    'identifier' : redefinition; different basic types
    

    You say that the error is on line 4; in that case, presumably the identifier is AAA, and you’ve already declared something else called AAA.

    As to why it succeeds on a 15-year-old pre-standard compiler, you’ll have to ask a historian.

    Also, get rid of that typedef struct nonsense; it’s a bad idea in C, and completely pointless in C++. And unless you need to support 16-bit MS-DOS, get rid of that FAR* nonsense too; you just need

    struct AAA {
        unsigned char a;
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a stupid question but I have a code with the following
Hello this is may first question and I have found so far the following
This question may have been asked before, but I had trouble finding an answer,
I have a question that may be quite naive, but I feel the need
I have a question that may sound odd, but being somewhat of a newbie,
quick question on declaring functions. Lets say I have the following code: class a{
As you may have guessed from the question - I am right at the
I have a question which may be somewhat silly because I'm pretty sure I
May be a stoopid question: I have a number of reference tables in an
I have what may be a pretty elementary Hibernate question. Do HQL (and/or Criteria)

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.