Redian新闻
>
Who knows whether documentation for madwifi is available?
avatar
Who knows whether documentation for madwifi is available?# EE - 电子工程
G*n
1
看到i++和++i的讨论,想到如果要overload他们,怎样declare才能把它们区分开呢?
avatar
l*e
2
有一个matlab compiler问题弄的我头晕脑涨的,用过这个compiler的一定指点指点。
我在matlab中写了一个普通的*.m文件,在unix中用mcc 命令把*.m转化成stand-alone的
C文件, 然后用setenv指定
了matlab的 lib. 然后运行文件,到这里都没有什么问题,但就是给我一error,说data
不能打开。
所以很想知道要用这个compiler对数据type or上载有什么要求吗?我在.m中直接写
load *.txt。 我用的是compiler
version 2.3. 是不是必须要load *.mat,,可当我改成load *.mat,又说找不到相应
与数据名相同的variable. 究竟是
什么问题啊?
avatar
l*e
3
i am using Madwifi for projects. But I want to find some descriptions for
functions and files of Madwifi source codes.
Who have such info?
Thanks!
avatar
u*z
4
class Number {
public:
Number& operator++ (); // prefix ++
Number operator++ (int); // postfix ++
};

【在 G*******n 的大作中提到】
: 看到i++和++i的讨论,想到如果要overload他们,怎样declare才能把它们区分开呢?
avatar
l*n
5
Does your m file run?
check your unix file permissions.
This are the first 2 checks to do.
avatar
i*h
6
one of them has a dummy arg
avatar
l*e
7
Yes, my m files runs.
The data is my data, so I have no problem with viewing it and opening it.
avatar
f*Q
8
++i
=================
I I:: operator++(){
/*
Do whatever you want.
*/
return *this;
}
=================
i++
==================
I I::operator++(int){//Don't ask me why, I don't know
I r = *this;
/*
Do whatever you want.
*/
return r;
}
===================
有高手给解释一下为什么吗?
avatar
i*h
9
It's a dummy arg, doesn't have a name so can't be used in the function.
Just a trick to tell compiler this is a different function from the prefix
version.
avatar
t*t
10
err, strictly speaking, even it is a "dummy" arg, it can still have a name (
although most ppl don't give a name). AND it will be called with value 0.
but that doesn't really matter...

【在 i***h 的大作中提到】
: It's a dummy arg, doesn't have a name so can't be used in the function.
: Just a trick to tell compiler this is a different function from the prefix
: version.

avatar
i*h
11

(
You are right. I was referring to the code example upstairs, which does not
have a name
AND it will be called with value 0.
A question, if it does not have a name, is the compiler smart enough not to
create storage for it on the function stack? Thanks

【在 t****t 的大作中提到】
: err, strictly speaking, even it is a "dummy" arg, it can still have a name (
: although most ppl don't give a name). AND it will be called with value 0.
: but that doesn't really matter...

avatar
t*t
12
if the function is inlined, then yes. if not, probably not (i am not sure).

not
to

【在 i***h 的大作中提到】
:
: (
: You are right. I was referring to the code example upstairs, which does not
: have a name
: AND it will be called with value 0.
: A question, if it does not have a name, is the compiler smart enough not to
: create storage for it on the function stack? Thanks

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。