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
Solved

Help! Passing an Image to a procedure.

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

828 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