class pointers

J

john townsley

hello

I am a little rustry with C++, when you declare a class method with a
pointer

eg...unsigned char *CTexture::LoadBitmapFile(char *fi....

what does this mean again, is this method of a class pointer?which is?

thanks
 
J

Jack Klein

hello

I am a little rustry with C++, when you declare a class method with a
pointer

eg...unsigned char *CTexture::LoadBitmapFile(char *fi....

what does this mean again, is this method of a class pointer?which is?

thanks

That means that the function returns a pointer to an unsigned char.
Most likely, if the member function 'LoadBitmapFile' is any
indication, it actually points to the first of a number of unsigned
chars holding the data loaded from the file.
 
J

john townsley

Why is their a need to return a pointer to char why not just a char.
Why would you return a pointer from a method......would it be to point to a
large bit of information?
 
J

Jack Klein

On Fri, 24 Dec 2004 17:30:55 +1100, "john townsley"

Please don't top-post, it is considered rude here and in most
technical discussion groups. New material you add belongs after the
quoted material you are replying to, as I did in your original post.
Do a search on Google, there are patches available for Microsoft's
brain-dead software to reply properly.

I have reformatted your post properly, and added a reply at the end
where it belongs.
Why is their a need to return a pointer to char why not just a char.
Why would you return a pointer from a method......would it be to point to a
large bit of information?

Read my reply again. This time read all the words, and think about
the last sentence that I wrote. If you still don't understand why a
function like this would return a pointer, you are more than rusty and
I would suggest getting a good book on C++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top