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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:52:11+00:00 2026-06-09T15:52:11+00:00

Newbie question. I am trying to get libcork to compile with VS2010. In C

  • 0

Newbie question.

I am trying to get libcork to compile with VS2010.

In C I guess you typically have to declare variables at the beginning of the function like this:

void
cork_hash_table_clear(struct cork_hash_table *table)
{

    DEBUG("(clear) Removing all entries");

    size_t  i;  // <--- fails to compile unless moved before DEBUG.
    ...

But libcork is rife with definitions/declarations as they are used in code. I wonder if there is a VS compiler option that allows this? I’m sorry if this question is not new, but all I get is a syntax error and I don’t have any helpful terms to use to search the VS docs.

  • 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-09T15:52:13+00:00Added an answer on June 9, 2026 at 3:52 pm

    Intermixed declarations and statements within a function were introduced into C in the 1999 version of the standard (C99); unfortunately VS decided not to follow the standard past the 1990 version.

    You may be able to compile the code as C++, although this could well break in interesting ways as C is not a strict subset of C++. Herb Sutter recommends using Intel CC or gcc if the code is not compatible with C++.

    The question Visual Studio support for new C / C++ standards? has some interesting content, although it covers C++ as well (where VS is far better at keeping pace).

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

Sidebar

Related Questions

This seems like a newbie question except that I've been trying to wrap my
Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
Complete rails newbie trying to get started. I have two classes, Ingredient, and Unit.
Newbie question comming up. Trying to get my head around JAVA. How do I
Newbie question... I'm trying to get form validation working with Spring Web using this
Another newbie question, just when I thought I was beginning to get a very
This is a total newbie question, so thanks in advance. I'm trying to get
I'm a newbie in Matlab and trying get rid of Java/C++ customs. The question
I apologize if this is a newbie question. I have been working on trying
Newbie question since I'm not up to speed using maven at all. I'm trying

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.