More than one main()

K

Krice

I was browsing through a source code of game Abura Tan and discovered
that there are 11 main()-functions. I always thought a program could
have only one main(). What is the reason for those main-functions?
The source code can be downloaded from Abura Tan's homepage:

http://aburatan.sourceforge.net/

There are also classes without instances (like Keyboard) which was new
to me and I didn't know it was possible to use a class without making
an
instance from it.
 
R

red floyd

Krice said:
I was browsing through a source code of game Abura Tan and discovered
that there are 11 main()-functions. I always thought a program could
have only one main(). What is the reason for those main-functions?
The source code can be downloaded from Abura Tan's homepage:

http://aburatan.sourceforge.net/

There are also classes without instances (like Keyboard) which was new
to me and I didn't know it was possible to use a class without making
an
instance from it.

Wrong place to ask. Ask in Abura Tan's SF forums.
 
S

Simon

red said:
Wrong place to ask. Ask in Abura Tan's SF forums.

I don't think the questions we only targeted at Abura but rather to C++
in general.
The OP was asking something along the lines,

Is it legal to have more than one main() and, is it possible to use a
class without making an instance from it?

But I could be wrong

Simon
 
R

Rolf Magnus

Krice said:
I was browsing through a source code of game Abura Tan and discovered
that there are 11 main()-functions. I always thought a program could
have only one main().

That is right.
What is the reason for those main-functions?

Maybe it contains multiple programs?
There are also classes without instances (like Keyboard) which was new
to me and I didn't know it was possible to use a class without making
an instance from it.

Well, it is. You can only use static members though. However, it's
preferable to put them into a namespace instead of a class.
 
K

Krice

Maybe it contains multiple programs?

Well sort of. It seems the author has written test sections
for some files which can be compiled separately with main()
that runs them. Should have looked more closely, but I was
stunned for a moment.
 
R

Richard Herring

Rolf Magnus said:
That is right.


Maybe it contains multiple programs?


Well, it is. You can only use static members though.

And typedefs, which opens up endless metaprogramming possibilities...
However, it's
preferable to put them into a namespace instead of a class.

Not if it's e.g. a traits class template ;-)
 
R

red floyd

red floydwrote:


I don't think the questions we only targeted at Abura but rather to C++
in general.
The OP was asking something along the lines,

Is it legal to have more than one main() and, is it possible to use a
class without making an instance from it?

But I could be wrong

Sorry, I had read it differently. To me it was obvious that there
were multiple programs, and he was asking "why?".

I was a bit quick with the blaster... Probably caused by wading
through all those fake "Ed Hardy" and "Air Jordan" spams.
 
D

Default User

red floyd wrote:

I was a bit quick with the blaster... Probably caused by wading
through all those fake "Ed Hardy" and "Air Jordan" spams.

If possible (and I realize that for some it isn't) you should look into
another solution for newsreading. Many real news services are using
filters at the server to eliminate this sort of spam. I haven't seen
any of the sort you mention in quite some time.




Brian
 
R

Rolf Magnus

red said:
I was a bit quick with the blaster... Probably caused by wading
through all those fake "Ed Hardy" and "Air Jordan" spams.

Unfortunately, Google Groups, through which all of that spam is sent, don't
give a sh*t about it. That's why I hate Google Groups and don't like it if
people use it. By doing so, they support the biggest source of spam in
Usenet.
 
S

Simon

I was a bit quick with the blaster... Probably caused by wading
through all those fake "Ed Hardy" and "Air Jordan" spams.

I use news.individual.net and they seem to have a fairly good filter
when it comes to spam.

I haven't see any of the spam you mention for quite sometime, (not just
here but for all NGs I read).

Simon
 
A

Alf P. Steinbach

* Simon:
I use news.individual.net and they seem to have a fairly good filter
when it comes to spam.

As I recall, news.individual.net uses the de facto standard "cleanfeed" filter.

I haven't see any of the spam you mention for quite sometime, (not just
here but for all NGs I read).

Unfortunately, eternal-september (formerly motzarilla) lets through all "Air
Jordan" spam, and lets through the headers for other spam.

All the spam, not a single exception, and I think this holds for the last two
years, originates with Google Groups, and nearly all with GMail addresses.

Google did at one point add captcha verification, which reduced the spam greatly
for a period. It's unknown whether they did that in response to spam reports,
though. Google automates spam report handling and I've never seen evidence of a
human in the loop. This is just like Yahoo and before that, Hotmail.

Google took on some responsibility when they acquired the DejaNews archive (the
main Usenet archive), and they're not shouldering that responsibility.

Quite possibly only a Usenet Death Penalty[1], where no articles from Google
Groups are propagated, might spur them to action, if at all, but then -- which
as I judge it is right around the corner -- it will be too late; bye, GG.


Cheers,

- Alf


Notes:
[1] For complacent imbeciles at Google who don't know what a UDP is:
<http://en.wikipedia.org/wiki/Usenet_Death_Penalty>

CC: (e-mail address removed)
 
R

red floyd

Default said:
red floyd wrote:



If possible (and I realize that for some it isn't) you should look into
another solution for newsreading. Many real news services are using
filters at the server to eliminate this sort of spam. I haven't seen
any of the sort you mention in quite some time.

Have to use Google Groups at work. They block NNTP.
 
A

Alf P. Steinbach

* red floyd:
Have to use Google Groups at work. They block NNTP.

I'm not sure but I think motzarella has a port 80 (HTTP-port) NNTP server.

Cheers & hth.,

- Alf
 
R

Rolf Magnus

Alf said:
Google automates spam report handling and I've never seen evidence of a
human in the loop. This is just like Yahoo and before that, Hotmail.

What exactly do you mean by "automates"? Anything beyond just forwarding
spam report mails to /dev/null? I've seen no reaction at all to mine so far.
 
A

Alf P. Steinbach

* Rolf Magnus:
What exactly do you mean by "automates"? Anything beyond just forwarding
spam report mails to /dev/null? I've seen no reaction at all to mine so far.

At least (e-mail address removed) automatically sends back a confirmation of receipt.

A sample Google's confirmation mail is shown below.

Note that it:

1. Starts by directing the reporting person to a cul-de-sac maze.

2. Goes on to state that all abuse reports are ignored. Namely, "your
report will be given the highest priority", which, considering that
this is standard text and applies to all reports, means that the
highest priority must be exactly zero.

3. Ends with soothing words like "we appreciate" and intentionally misleading
statements like "your cooperation" (as if Google actually wanted reports,
after having stated that their highest priority is zero).

The text has evolved somewhat over time.

The original text, some years ago, was less sophisticated, more like plain lying
instead of subtle misdirection.
 
S

Simon

Quite possibly only a Usenet Death Penalty[1], where no articles from
Google Groups are propagated, might spur them to action, if at all, but
then -- which as I judge it is right around the corner -- it will be
too late; bye, GG.

Google has a long history of doing nothing about spam.

Our, (albeit small), internet company has already blocked any GMail
accounts on sight.
We might be small, but I know that we are not the only one to do so and
I also know that, slowly, more and more companies are doing the same.
It is only a mater of time before GMail is pretty much unusable.

UDP will probably be the final nail in an already well built GMail coffin.

Simon
 
J

James Kanze

* red floyd:
I'm not sure but I think motzarella has a port 80 (HTTP-port)
NNTP server.

I didn't get that impression from their site: they serve NNTP on
port 119, and have a web browser on port 80. But it's an
interesting idea, and shouldn't be too hard to implement.
(You'd want to tunnel, of course---some firewalls might actually
verify that what they're letting through on port 80 is HTTP.)
 
T

Tim Slattery

Alf P. Steinbach said:
* Rolf Magnus:

At least (e-mail address removed) automatically sends back a confirmation of receipt.

The header in the posts say to report to (e-mail address removed). I've
been doing that for quite a while now. I used to get an
acknowledgement (at least for the first report when I send a bunch in
a few minutes), now I never get anything at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top