Sign in to follow this  
majj

lesson 6 in vc++ 2005

Recommended Posts

majj    100
I tried till lesson 5 and got stuck in lesson 6 when my compiler started complaining that function 'free' is not identified! But when I convert the downloaded project and run it in vc++ 2005 the programme work perfect! How can it be? /* Now we free up any ram that we may have used to store the bitmap data. We check to see if the bitmap data was stored in TextureImage[0]. If it was we check to see if the data has been stored. If data was stored, we erase it. Then we free the image structure making sure any used memory is freed up. if (TextureImage[0]) // If Texture Exists { if (TextureImage[0]->data) // If Texture Image Exists { free(TextureImage[0]->data); // Free The Texture Image Memory } free(TextureImage[0]); // Free The Image Structure }*/ HOW CAN I CORRECT THE ERROR OR IS THE ABOVE CODING IS REALLY NECCESARY?

Share this post


Link to post
Share on other sites
Evil Steve    2017
Quote:
Original post by majj
I tried till lesson 5 and got stuck in lesson 6 when my compiler started complaining that function 'free' is not identified! But when I convert the downloaded project and run it in vc++ 2005 the programme work perfect! How can it be?
If it works perfectly, then what's the problem?

If your edited version doesn't work, but the downloaded one does, what are the differences between the two?

Share this post


Link to post
Share on other sites
majj    100
The downloaded version is written in vc++ 2003 and I'm using vc++ 2005.The converted version compiles correctly,it does'nt give any error message for the function 'free'.I though it is a function defined in on of the header files that i included.But when i create my own project in vc++ 2005 with all the correct header files libreries and all that my compiler says 'free' idenitifier is not found.How can it be? It should hav given the same error messge to the converted project also isn't it?

Share this post


Link to post
Share on other sites

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