Solved

Help! Passing an Image to a procedure.

Posted on 2000-03-25
1
200 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now