Solved

Help! Passing an Image to a procedure.

Posted on 2000-03-25
1
210 Views
Last Modified: 2010-04-02
I need to pass a TImage object to a procedure. The procedure moves the image according to the co ords I pass to it. I put the procedure in a seperate unit and the declaration in the header file. I tried passing the Image as Of type TImage. It didn't work.

Can anyone give me an example of how I can do this correctly.I am using Borland C++3.

I am sorry but I have only 5 points
left

Thanks in advance

John
0
Comment
Question by:pcb69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
amador earned 5 total points
ID: 2657633
well

int f (TImage x);

.. . .

TImage image1;

f (image1)

Verify if TImage is not a pointer.
if it is:

or
in prototype:
int f(TImage *x);

or

in call:
Timage y;

y = (Timage *) image1     //(ps. image1 is a pointer)
f(y);

ok?

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question