Mail Archives: djgpp/1999/11/05/16:14:34
From: | "Philip Bock" <philipb AT escape DOT ca>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Pointers passed to functions
|
Lines: | 26
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300
|
Message-ID: | <4cGU3.2300$1J5.254437@typhoon.mbnet.mb.ca>
|
Date: | Fri, 05 Nov 1999 19:26:56 GMT
|
NNTP-Posting-Host: | 216.81.25.199
|
X-Trace: | typhoon.mbnet.mb.ca 941830016 216.81.25.199 (Fri, 05 Nov 1999 13:26:56 CST)
|
NNTP-Posting-Date: | Fri, 05 Nov 1999 13:26:56 CST
|
Organization: | MBnet Networking Inc.
|
To: | djgpp AT Delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I have a function whose definition looks like this: (vimg is a struct)
void draw_vimg(vimg vectimg, int x, int y, int xscale, int yscale);
I want to pass it a vimg defined like so: (gen_vimg creates and sets initail
values for the struct)
vimg *mygraphic;
mygraphic = gen_vimg();
So I call draw_vimg like this:
draw_vimg(mygraphic, 200, 100, 1, 1);
And I get errors like this:
vector.cpp: In function `int main()':
vector.cpp:45: conversion from `vimg *' to non-scalar type `vimg'
requested
So what can I do to send pointers to functions that call for variables, and
not pointers too the variables?
Thanks for your help. Philip.
- Raw text -