php在c ++中使用了vars [英] php styled vars in c++
问题描述
你好,
你知道一个添加php风格变量的c ++类吗?
例如:
var1 =" 5只狗>
var2 = 3
var1 + var2 = 8
好吧,对于一些人来说这看起来很奇怪,但有没有一个类支持
无类型变量?
谢谢,
Christian
Christian Hofmann写道:你好,
例如:
var1 =" 5只狗狗狗狗狗狗狗的颜色=
>
var1 + var2 = 8
好的,对于某些人来说这看起来很奇怪,但有没有一个类支持无类型变量?
>谢谢,
基督徒
不,但要制作一个并不困难。你当然还是必须要声明变量,不像PHP那样。
- Pete
< blockquote> Christian Hofmann发布:
你好,
你知道一个添加php风格变量的c ++类吗?
例如:
var1 =5只狗
var2 = 3
var1 + var2 = 8
好的,对于有些人来说这个看起来很奇怪,但有没有一个类支持无类型变量?
谢谢,
Christian
我非常肯定你会在网上找到一些可重复使用的代码
'我会这样做,我会搜索类似变体C ++的内容"," Variant Class
C ++"," Variant Type C ++"。由此产生的实际机器代码将非常悲观。
-JKop
" Christian Hofmann" < CH *************** @ gmx.de>在消息中写道
news:caf3ct
Hello,
do you know a c++ class that adds php styled variables?
For example:
var1 = "5 dogs"
var2 = 3
var1 + var2 = 8
okay, for some people this looks weird, but is there a class that supports
type-free variables?
Thanks,
Christian
Christian Hofmann wrote:Hello,
do you know a c++ class that adds php styled variables?
For example:
var1 = "5 dogs"
var2 = 3
var1 + var2 = 8
okay, for some people this looks weird, but is there a class that
supports type-free variables?
Thanks,
Christian
No, but it would not be difficult to make one. You would of course still
have to declare the variables, unlike in PHP.
- Pete
Christian Hofmann posted:
Hello,
do you know a c++ class that adds php styled variables?
For example:
var1 = "5 dogs"
var2 = 3
var1 + var2 = 8
okay, for some people this looks weird, but is there a class that
supports type-free variables?
Thanks,
Christian
I''m pretty much certain you''ll find some re-usable code somewhere on the net
that''ll do that, I''d search for something like "Variant C++", "Variant Class
C++", "Variant Type C++". The resulting actual machine code will be
extremely pessimized.
-JKop
"Christian Hofmann" <ch***************@gmx.de> wrote in message
news:caf3ct
这篇关于php在c ++中使用了vars的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!