473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Obscure Syntax

HI,

I have had a 5 year Java holiday from C++ and seem to have become super
rusty.
Can anyone tell me what this syntax below means (inside "THIS CODE
HERE" comment):

......
......
#include <iostream>
#include <cmath>

using namespace std;

// THIS CODE HERE --->
StaticSynapse::NeuronConnector StaticSynapse::Connect;
DynamicSynapse::NeuronConnector DynamicSynapse::Connect;
// <----------------------------------
Synapse::Synapse(SynapseProperties& synProps):
dendrite(0),
lastTransTime(0)
{
....
....

I dont mean what it does in this context but what is it? A Forward
declaration or something? It seems to have the form "ClassA ClassB;"

I would really appreciate any tips.
Cheers

Bster

Apr 2 '06 #1
2 2108
// THIS CODE HERE --->
StaticSynapse::NeuronConnector StaticSynapse::Connect;
DynamicSynapse::NeuronConnector DynamicSynapse::Connect;
// <----------------------------------


Looks like:

"StaticSynapse" is a class
"NeuronConnector" is a type which is defined within the class.
"Connect" is a static member.
It looks like this is the definition of the static member objects.
class Synapse
{
typedef int NeuronConnector;
};

class StaticSynapse : public Synapse
{
static NeuronConnector Connect; //static member data declaration
};

class DynamicSynapse : public Synapse
{
static NeuronConnector Connect; //static member data declaration

};
//Here's where the objects are actually defined
StaticSynapse::NeuronConnector StaticSynapse::Connect;
DynamicSynapse::NeuronConnector DynamicSynapse::Connect;

-Tomás
Apr 2 '06 #2
Thanks a lot.
I was thrown by the capitalisation. I thought it was:
NAMESPACEA::CLASSA NAMESPACEA::CLASSB;
NAMESPACEB::CLASSC NAMESPACEB::CLASSC;

But I see now.

Bster

Apr 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ryan | last post by:
hi i am having a problem with a php script i am trying to write. the problem is that the ouput from the script (the html) was sometimes being truncated, but sometimes it would work as expected....
6
by: Batista, Facundo | last post by:
I'm doing a small program, in which the user will have the option to enter his/her password everytime, or just save it (to a file). So, is there a module to obscure the password text in a secure...
2
by: Frank Millman | last post by:
Hi all Below is the text of a message I was about to send in connection with an obscure problem. I have now almost got to the bottom of it, and am fairly confident that it is a bug in pyPgSQL. I...
14
by: Andrew Poulos | last post by:
I've built a javascript driven quiz. Given that client-side scripting is not secure, is there a way to "obscure" answers so that they are unavailable to the casual viewer? For example, If I have an...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
24
by: Massimo Soricetti | last post by:
Hello, I'm not a C newbie, but I'm teaching C programming (well... FIRST programming and then C) to other guys these days and it's driving me to some reflexions on the language. It's not...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
2
by: subnunciation | last post by:
i know, this shouldnt be a conundrum right? one just shouldnt divide by zero. but this is suddenly happening *all over* my site. after chasing the error here and there, i simplified things down to:...
3
by: Bernie Hunt | last post by:
I have a login dialog that has a text box on it for the user to type their password. How can I obscure the information they are entering into the password box? I could blank it, but a more...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.