I am a bit confused with the two marked lines. I have never seen such syntax
even though I read a lot
of C++ codes.
Thanks for your suggestion...
BluetoothReceiver::BluetoothReceiver()
: bandpassFilter(BPLENGTH), <--- Here
differentiatorFilter(DIFFLENGTH) <--- Here
{
m_bitrate = 1;
m_bitDelay = BITDELAYBT;
// Compute Bandpass filter coefficients and
const double h0 = sqrt(2.0) * Br;
const double kexp = -twopi * Br * Br;
for (int i=0; i<bandpassFilter.size(); ++i) {
double temp = i - (BPLENGTH *1.)/2.+.5;
temp /= Ns;
double hreal = h0 * exp(kexp * temp * temp);
bandpassFilter[i] = Sample(hreal,0.0);
}
// Set Differentiator filter coefficients
differentiatorFilter[0] = Sample(-0.0062, 0.0);
differentiatorFilter[1] = Sample(0.0372, 0.0);
differentiatorFilter[2] = Sample(-0.4566, 0.0);
differentiatorFilter[3] = Sample(0.4566, 0.0);
differentiatorFilter[4] = Sample(-0.0372, 0.0);
differentiatorFilter[5] = Sample(0.0062, 0.0);
} 4 1263
On Fri, 21 Jan 2005 21:43:38 +0800, Feverish <fe*********@h0tmail.c0nn>
wrote: I am a bit confused with the two marked lines. I have never seen such syntax even though I read a lot of C++ codes.
Thanks for your suggestion... BluetoothReceiver::BluetoothReceiver() : bandpassFilter(BPLENGTH), <--- Here differentiatorFilter(DIFFLENGTH) <--- Here { m_bitrate = 1; m_bitDelay = BITDELAYBT;
// Compute Bandpass filter coefficients and const double h0 = sqrt(2.0) * Br; const double kexp = -twopi * Br * Br; for (int i=0; i<bandpassFilter.size(); ++i) { double temp = i - (BPLENGTH *1.)/2.+.5; temp /= Ns; double hreal = h0 * exp(kexp * temp * temp); bandpassFilter[i] = Sample(hreal,0.0); }
// Set Differentiator filter coefficients differentiatorFilter[0] = Sample(-0.0062, 0.0); differentiatorFilter[1] = Sample(0.0372, 0.0); differentiatorFilter[2] = Sample(-0.4566, 0.0); differentiatorFilter[3] = Sample(0.4566, 0.0); differentiatorFilter[4] = Sample(-0.0372, 0.0); differentiatorFilter[5] = Sample(0.0062, 0.0); }
supposed that bandpassFilter and differentiatorFilter are member variables
of class BluetoothReceiver, your to marked lines are the initialiser list
of class BluetoothReceiver's constructor.
at this place, you cannot only initialize member variables, but also call
base class constructors.
--
have a nice day
ulrich
Ulrich Achleitner wrote: On Fri, 21 Jan 2005 21:43:38 +0800, Feverish <fe*********@h0tmail.c0nn> wrote:
I am a bit confused with the two marked lines. I have never seen such syntax even though I read a lot of C++ codes.
Thanks for your suggestion... BluetoothReceiver::BluetoothReceiver() bandpassFilter(BPLENGTH), <--- Here
Assuming the OP delete a preceding ':' here, other wise this would cause a
compilation error.
differentiatorFilter(DIFFLENGTH) <--- Here { m_bitrate = 1; m_bitDelay = BITDELAYBT;
// Compute Bandpass filter coefficients and const double h0 = sqrt(2.0) * Br; const double kexp = -twopi * Br * Br; for (int i=0; i<bandpassFilter.size(); ++i) { double temp = i - (BPLENGTH *1.)/2.+.5; temp /= Ns; double hreal = h0 * exp(kexp * temp * temp); bandpassFilter[i] = Sample(hreal,0.0); }
// Set Differentiator filter coefficients differentiatorFilter[0] = Sample(-0.0062, 0.0); differentiatorFilter[1] = Sample(0.0372, 0.0); differentiatorFilter[2] = Sample(-0.4566, 0.0); differentiatorFilter[3] = Sample(0.4566, 0.0); differentiatorFilter[4] = Sample(-0.0372, 0.0); differentiatorFilter[5] = Sample(0.0062, 0.0); }
supposed that bandpassFilter and differentiatorFilter are member variables of class BluetoothReceiver, your to marked lines are the initialiser list of class BluetoothReceiver's constructor. at this place, you cannot only initialize member variables, but also call base class constructors.
"Jeff Flinn" <NO****@nowhere.com> wrote in message
news:cs**********@bluegill.adi.com... BluetoothReceiver::BluetoothReceiver() bandpassFilter(BPLENGTH), <--- Here
Assuming the OP delete a preceding ':' here, other wise this would cause a compilation error.
See the original post. The colon is there (second line).
-Mike
Jeff Flinn wrote: Ulrich Achleitner wrote:
On Fri, 21 Jan 2005 21:43:38 +0800, Feverish <fe*********@h0tmail.c0nn> wrote:
I am a bit confused with the two marked lines. I have never seen such syntax even though I read a lot of C++ codes.
Thanks for your suggestion...
BluetoothReceiver::BluetoothReceiver()
bandpassFilter(BPLENGTH), <--- Here
Assuming the OP delete a preceding ':' here, other wise this would cause a compilation error.
<snip excessive quote>
It appears that you use OE-QuoteFix, but it still somehow managed to
screw up the first paragraph. Which, among other things, recognises
certain oddball quoting prefixes and turns them all into the 'standard'
greater-than signs. This has happened in this instance, hence the
apparent extra quoting level.
I used to use OEQF too, but forget if it would've left the colon put if
it were indented by a certain number of spaces.
Stewart.
--
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Christian McArdle |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.os.ms-windows.programmer.64bit
This is a formal Request For Discussion (RFD) to create
comp.os.ms-windows.programmer.64bit as an unmoderated...
|
by: BK |
last post by:
Our .Net team has just inherited a junior programmer that we need to
get up to speed as quickly as possible. Unfortunately, his skill set
is largely Access with some VB6 and ASP classic...
|
by: gunimpi |
last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431
********************************************************
VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help
wanted...
|
by: Chris Carlen |
last post by:
Hi:
From what I've read of OOP, I don't get it. I have also found some
articles profoundly critical of OOP. I tend to relate to these articles.
However, those articles were no more objective...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| | |