Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

More than one main()

0 views
Skip to first unread message

Krice

unread,
Jul 8, 2009, 1:20:43 AM7/8/09
to
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.

red floyd

unread,
Jul 8, 2009, 1:54:31 AM7/8/09
to

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

Simon

unread,
Jul 8, 2009, 2:20:04 AM7/8/09
to
red floyd wrote:

>
> 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

Krice

unread,
Jul 8, 2009, 2:29:15 AM7/8/09
to
On 8 heinä, 08:54, red floyd <no.spam.h...@its.invalid> wrote:
> Wrong place to ask.  Ask in Abura Tan's SF forums.

Both questions are C++-related. Please think before you reply.

Rolf Magnus

unread,
Jul 8, 2009, 3:46:59 AM7/8/09
to
Krice wrote:

> 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.

Krice

unread,
Jul 8, 2009, 6:42:05 AM7/8/09
to
On 8 heinä, 10:46, Rolf Magnus <ramag...@t-online.de> wrote:
> 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.

Richard Herring

unread,
Jul 8, 2009, 9:26:36 AM7/8/09
to
In message <h31itr$bqs$03$1...@news.t-online.com>, Rolf Magnus
<rama...@t-online.de> writes

>Krice wrote:
>
>> 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.

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 ;-)

--
Richard Herring

red floyd

unread,
Jul 8, 2009, 12:32:18 PM7/8/09
to
On Jul 7, 11:20 pm, Simon <b...@example.com> wrote:
> red floydwrote:

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.

Default User

unread,
Jul 8, 2009, 2:37:31 PM7/8/09
to
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

Rolf Magnus

unread,
Jul 8, 2009, 4:12:52 PM7/8/09
to
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.

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.


Simon

unread,
Jul 9, 2009, 1:54:54 AM7/9/09
to
> 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

Alf P. Steinbach

unread,
Jul 9, 2009, 2:13:19 AM7/9/09
to
* 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.

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: ab...@gmail.com

red floyd

unread,
Jul 9, 2009, 2:16:37 AM7/9/09
to

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

Alf P. Steinbach

unread,
Jul 9, 2009, 2:19:39 AM7/9/09
to
* red floyd:

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

Cheers & hth.,

- Alf

Rolf Magnus

unread,
Jul 9, 2009, 4:17:51 AM7/9/09
to
Alf P. Steinbach wrote:

> 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.


Alf P. Steinbach

unread,
Jul 9, 2009, 4:28:17 AM7/9/09
to
* Rolf Magnus:

At least ab...@gmail.com 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.


> Hello,
>
> Thank you for your report. Your email has been provided to the Gmail Abuse
> team.
>
> To help us process your request as quickly as possible, we recommend
> visiting the Gmail Privacy & Security topic at
> https://mail.google.com/support/bin/topic.py?topic=12784
>
> WHAT HAPPENS WHEN YOU REPORT ABUSE?
>
> Your email has been provided to the Gmail Abuse team. Any additional
> information that you provide through the forms in the Gmail Security
> Center will be added to your original message, and will help us to more
> efficiently process your request.
>
> Google takes abuse situations very seriously -- your claim will be given
> the highest priority. When submitting a claim through our Security Center,
> please include as much information as possible, so that the Gmail Abuse
> team can investigate thoroughly and work quickly to resolve your claim. As
> appropriate, we may warn users or discontinue Gmail service for the
> account(s) in question. For privacy and security reasons, we may not
> reveal the final outcome of an abuse case to the person who reported it.
> To read the Gmail Terms of Use, please visit
> http://mail.google.com/gmail/help/terms_of_use.html.
>
> If your issue is not related to abuse, you may want to visit our Help
> Center at http://mail.google.com/support/, or by clicking 'Help' at the
> top of any Gmail page.
>
> We appreciate the urgent nature of your message, and thank you for your
> cooperation.
>
> Sincerely,
>
> The Google Team
>
>

Simon

unread,
Jul 9, 2009, 4:32:49 AM7/9/09
to
> 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

James Kanze

unread,
Jul 9, 2009, 5:17:01 AM7/9/09
to

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.)

--
James Kanze (GABI Software) email:james...@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Tim Slattery

unread,
Jul 9, 2009, 9:17:46 AM7/9/09
to
"Alf P. Steinbach" <al...@start.no> wrote:

>* Rolf Magnus:
>> Alf P. Steinbach wrote:
>>
>>> 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.
>
>At least ab...@gmail.com automatically sends back a confirmation of receipt.

The header in the posts say to report to groups...@google.com. 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.

--
Tim Slattery
Slatt...@bls.gov
http://members.cox.net/slatteryt

Default User

unread,
Jul 9, 2009, 11:46:20 AM7/9/09
to
red floyd wrote:

> Default User wrote:
> > 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.

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

Unfortunately all too common.


Brian

Default User

unread,
Jul 9, 2009, 11:47:35 AM7/9/09
to
Alf P. Steinbach wrote:

> * 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.

Generally, I would not urge people to try to circumvent company
policies in this area.


Brian

Alf P. Steinbach

unread,
Jul 9, 2009, 12:05:24 PM7/9/09
to
* Default User:

Good for you. :-)

But generally you're mistaken that every company whose firewall blocks port 119
has a policy to not use newsgroups at work.

From own experience my impression is that they simply don't know about
newsgroups, and that the firewall blocks other ports than HTTP by default to
avoid P2P filesharing, gaming and such. If access to Google Groups is OK by
company policy, then using a technical solution to do the same with less spam
can't be wrong. Another solution might be to use one of the WWW discussion
boards that carry technical Usenet groups.

Default User

unread,
Jul 9, 2009, 2:13:32 PM7/9/09
to
Alf P. Steinbach wrote:

> * Default User:
> > Alf P. Steinbach wrote:
> >
> > > * 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.
> >
> > Generally, I would not urge people to try to circumvent company
> > policies in this area.
>
> Good for you. :-)
>
> But generally you're mistaken that every company whose firewall
> blocks port 119 has a policy to not use newsgroups at work.

The problem is, the way one often finds out that they do care is when
you're walking out to your car with a box of personal items.


Brian

Alf P. Steinbach

unread,
Jul 9, 2009, 3:02:08 PM7/9/09
to

If there is some prohibition against using newsgroups, then you'll know about it.

Anyway, if you're afraid that there might be, and you're afraid to be fired for
accessing newsgroups, then the easiest short term solution is to simply ask your
manager about using such resources, perhaps start with Google Groups.

In the long term, working for a firm that would fire you for using newsgroup
resources, it would probably be a good idea to look for some other job (all
assuming you're talking hypothetically and not something that happened).

0 new messages