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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:33:54+00:00 2026-05-25T20:33:54+00:00

The same code ran in TURBO C. struct details { char name[20]; int year;

  • 0

The same code ran in TURBO C.

    struct details
    {
      char name[20];
      int year;
      float price;
    }my_str;

    details book1[10];

This error is produced. How can this be fixed?

ram.c: In function ‘main’:
ram.c:11:1: error: ‘details’ undeclared (first use in this function)
ram.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
  • 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-25T20:33:55+00:00Added an answer on May 25, 2026 at 8:33 pm

    There are two ways to fix this:

    Change second line to this:

    struct details book1[10];
    

    Or you can change the declaration to:

    typedef struct{
        char name[20];
        int year;
        float price;
    } details;
    

    C is slightly different from C++, so you can’t declare structs quite the same way.

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

Sidebar

Related Questions

Does anybody know why the same code from this page http://emacsformacosx.com/ would not render
I've got another problem in the same code... I'm getting this error: initialization method
I use this code to update data in database table. Can reuse same code
This questions involves 2 different implementations of essentially the same code. First, using delegate
i wrote this tiny code on gedit and ran it :- #/usr/bin/perl print Enter
I'm translating some Delphi code into c# code when I ran into this. I
I am running the same exact code that I ran in plain C: pthread_create(&threads[i],
I have an existing website that uses the same code base, but is deployed
Casus: How to edit and advance with the same code, from several distanced locations
Greetings On all my controllers I recycle the same code that wraps my models

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.