转换为/从指针转换 [英] Converting to/from pointer

查看:106
本文介绍了转换为/从指针转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨组!


我有一个向量< floatvariable我需要传递给一个函数,但

该函数需要一个浮动*争论。那没关系,我可以转换为

做& MyVector.front(),但是当我从

函数返回一个浮点*时,如何转换回到矢量?


提前致谢!

Hi Group!

I have a vector<floatvariable that I need to pass to a function, but
the function takes a float * arguement. That''s OK, I can convert by
doing &MyVector.front(), but when I get back a float * from the
function, how to convert that back to a vector?

Thanks in advance!

推荐答案

Lame Duck说:
Lame Duck said:

嗨组!


我有一个向量< floatvariable我需要传递给一个函数,但是

函数采用浮动*争论。那没关系,我可以转换为

做& MyVector.front(),但是当我从

函数返回一个浮点*时,如何转换那回到矢量?
Hi Group!

I have a vector<floatvariable that I need to pass to a function, but
the function takes a float * arguement. That''s OK, I can convert by
doing &MyVector.front(), but when I get back a float * from the
function, how to convert that back to a vector?



这是一个C组。在comp.lang.c ++中询问。


交叉到该组,并设置后续跟踪。


-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上述域名中, - www。

This is a C group. Ask in comp.lang.c++.

Crossposted to that group, and followups set.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.


Lame Duck< no **** @ nospam。 comwrites:
Lame Duck <no****@nospam.comwrites:

我有一个向量< floatvariable我需要传递给一个函数,但

该函数需要一个浮动*争论。那没关系,我可以转换为

做& MyVector.front(),但是当我从

函数返回一个浮点*时,如何转换那回到矢量?
I have a vector<floatvariable that I need to pass to a function, but
the function takes a float * arguement. That''s OK, I can convert by
doing &MyVector.front(), but when I get back a float * from the
function, how to convert that back to a vector?



你的问题是关于C ++,但是这个新闻组谈到了C.

尝试comp.lang.c ++。

-

Ben Pfaff
http://benpfaff.org


Lame Duck写道:
Lame Duck wrote:

>

我有一个向量< floatvariable我需要传递给一个函数,但

该函数需要一个浮动*争论。那没关系,我可以转换为

做& MyVector.front(),但是当我从

函数返回一个浮点*时,如何转换那回到矢量?
>
I have a vector<floatvariable that I need to pass to a function, but
the function takes a float * arguement. That''s OK, I can convert by
doing &MyVector.front(), but when I get back a float * from the
function, how to convert that back to a vector?



Comp.lang.c ++在下一个城镇。试试吧。


-

< http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>

< http://www.securityfocus.com/columnists/423>

< http://www.aaxnet.com/editor/edit043.html>

< http://kadaitcha.cx/vista/dogsbreakfast/index.html>

cbfalconer at maineline dot net


-

通过 http:// www。中的免费Usenet帐户发布。 teranews.com

Comp.lang.c++ is in the next town. Try it.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com


这篇关于转换为/从指针转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆