Sign in to follow this  

static void

This topic is 3598 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey I used to have a little function that was called all the time so I made it static static void setfy(); which I thought meant that the function is always loaded in memory so it's faster. But my main program was getting huge so I split it up into lots of .h and .cpp files and I put setfy() into a .h and .cpp file and then when I try to compile it says /home/icecube/project5/src/orient.h:39: error: 'void setfy()' used but never defined What does that mean? To make it work I have to make it a regular function but I think I want to make it static.

Share this post


Link to post
Share on other sites
static doesn't seem to mean what you think it does. Applied to non-member functions it means that the function has internal linkage. Internal linkage, in turn, more or less means that the definition isn't visible outside the source file it's defined in. Solution: take off the static.

Share this post


Link to post
Share on other sites

This topic is 3598 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this