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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:38:16+00:00 2026-05-23T09:38:16+00:00

Its quite a common question but I have not got my answer so asking

  • 0

Its quite a common question but I have not got my answer so asking it again.

I have structers defined as:

struct f_lock{
              int x;
              struct f_lock *next;
     };

Then say I have a function:

struct f_lock *new_node()
{
   struct f_lock *new_f_lock;
   .....
   return new_f_lock;
}

Which I call from another function:

struct f_lock *new_f_lock;
new_f_lock = new_node(); //This line gives the error warning:assignment makes pointer from integer without a cast

Would be grateull for help
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-23T09:38:16+00:00Added an answer on May 23, 2026 at 9:38 am

    Did you also get the error implicit declaration of function ‘new_node’? Because in that case, you probably forgot to declare new_node in the module where you’re calling it. (If you’re not getting that error, recompile with -Wall to turn more warnings on.)

    Explanation of the warning message: if new_node has not been declared properly, the compiler will assume it returns int, which is a kind of default return type (for historical reasons).

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

Sidebar

Related Questions

It's not quite a programming question, but I hope its related closely enough. Do
I know that this question is quite common, but its specifics are stumping me.
I think this question is quite common. Recently I have got a requirement that
Forgive me for asking a common question, but I couldn't quite get what I
It's quite common to have a form with a checkbox stating Use foo immediately
I'm learning JQuery and have found the factory function $() with its selectors quite
I have worked a bit with Django and I quite like its project/applications model
Not quite sure how to troubleshoot this. I'm maintaining an ASP site, its mostly
It's quite a simple question - how do I sort a collection? I've got
It's quite possible a question like this has been asked before, but I can't

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.