Solved

Help! Passing an Image to a procedure.

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

Technology Partners: 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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

733 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