?
Solved

Help! Passing an Image to a procedure.

Posted on 2000-03-25
1
Medium Priority
?
213 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 20 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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

765 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