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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:58:46+00:00 2026-06-17T13:58:46+00:00

I have a character pointer named label, and also an enumerator that contains an

  • 0

I have a character pointer named label, and also an enumerator that contains an element named “label”. How can I differentiate between them in a case statement?

switch((I_ARG_TYPES) progrm[i].arg[j].type){
case (I_ARG_TYPES) value:
    break;
case (I_ARG_TYPES) label:
    break;
default:
    break;
}

Global scope:

typedef enum I_ARG_TYPES {
    value, label
} I_ARG_TYPES;

In the same function as the switch:

char label[MAXLINELENGTH]

“Case label does not reduce to an int” on the case for label.

  • 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-17T13:58:47+00:00Added an answer on June 17, 2026 at 1:58 pm

    You can’t. (Similarly, if you do float printf, you can’t call the printf() function in that scope.)

    Solution: Don’t give your local variables the same name as things from the global scope.

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

Sidebar

Related Questions

If I have a character pointer that contains NULL bytes is there any built
I have a character pointer that in any run can have different length. For
I have a constructor, that receives a character pointer. If it is empty, I
I have a character pointer like this char *ptr; I can allocate values to
I have several 450 element character arrays (storing bitmap data to display on lcd
I have a character pointer , char *buf; I have a array of integers
I have a simple C program which has a pointer to a character array.
I have one charater pointer array which points to the some stirngs every element
I have a character array and I'm trying to figure out if it matches
i have a character controller which jumps but while jumping i want to change

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.