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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:23:27+00:00 2026-05-27T19:23:27+00:00

MY BAD I WAS ACTUALLY WRITING THIS CODE OUTSIDE IMPLMENTATION, WHAT A BIG NAIVE

  • 0

MY BAD I WAS ACTUALLY WRITING THIS CODE OUTSIDE IMPLMENTATION, WHAT A BIG NAIVE MISTAKE

I am learning GCD queues and creating blocks to run in background,

-(IBAction) refresh:(id) sender
{
    dispatch_queue_t downloadQueue = dispatch_queue_create("app data", NULL);
    dispatch_async(downloadQueue, ^{
        //. . . Call a method which download XML file from server . . .
        dispatch_async(dispatch_get_main_queue(), ^{
        //. . . Update UI with dowanloaded data . . .    
        });
    });
    dispatch_release(downloadQueue);
}

but this line of code is showing compile error

dispatch_queue_t downloadQueue = dispatch_queue_create("eiap data", NULL);

ERROR: initialiser element is not a compile-time constant


I can say that something is wrong with “app data” a const char which I am creating kind a on the fly, But I don’t know what is wrong with it?

Thanks

  • 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-27T19:23:28+00:00Added an answer on May 27, 2026 at 7:23 pm

    If I do this, it compiles:

    dispatch_queue_t downloadQueue = dispatch_queue_create("app data", NULL);
    

    but if I do this, I get exactly the error you mention:

    static dispatch_queue_t downloadQueue = dispatch_queue_create("app data", NULL);
    

    I think you’re declaring it static. Or you’re actually declaring it outside the method body, as a global variable.

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

Sidebar

Related Questions

I am not sure if I am writing this code correctly. Fruit * o1
I got this bad feeling about how I insert larger amounts of HTML. Lets
We actually do not use test within our application (I know that's bad and
I've been writing a few classes lately; and I was wondering whether it's bad
I'm writing a dynamically-typed language. Currently, my objects are represented in this way: struct
How bad is it to use Location Manager to retrieve the location information when
What bad things happen at the moment document.write() is invoked? I've heard bits and
Either I had a bad dream recently or I am just too stupid to
I constantly hear how bad reflection is to use. While I generally avoid reflection
I'm doing something bad in my ASP.NET app. It could be the any number

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.