In the faq for this group:
Q: What's the correct declaration of main()?
A: There are two valid declarations:
int main(void)
int main(int argc, char **argv)
although they can be written in a variety of ways. The second parameter
may be declared char *argv[] (see question 6.4), you can use any names
for the two parameters, and you can use old-style syntax:
int main()
int main(argc, argv)
int argc; char **argv;
.......... http://c-faq.com/ansi/maindecl.html
The way this is worded it makes one think that "int main()" is a valid
declaration of main. However, main is allowed to only take two params
of (int, char **) or 0, correct? In C is not an empty param list an
"unspecifie d" param list? In that case "int main()" would be invalid
as it matches neither of the standard signatures.
Another faq claiming to represent this group has the following text for
the same Q:
A: Either int main(), int main(void), or int main(int argc,
char *argv[]) (with alternate spellings of argc and *argv[]
obviously allowed). See also questions 11.12b to 11.15 below.
References: ISO Sec. 5.1.2.2.1, Sec. G.5.1; H&S Sec. 20.1 p.
416; CT&P Sec. 3.10 pp. 50-51.
............... http://www.faqs.org/faqs/C-faq/faq/
It also has "int main()" but has no reasoning for its validity except
ref to the std I don't have access to. Is that truely a valid
signature? I always thought you _needed_ (void).
Aug 4 '06
49 1712
"Richard Heathfield" <in*****@invali d.invalidwrote in message
news:Mf******** ************@bt .com...
The kind of people who make good computer programmers are not the kind of
people to be confused easily by the fact that a newsgroup might discuss
K&R
C, C90, /and/ C99.
Ha Ha! Hilarious! I don't know how you can make such statements. Do you
actually have _any_ _real_ programming experience?
What people do you think become programmers in the US? Do you understand
that it is the people who have no chance of entering a higher paid field:
physicist, mathematician, electrical engineer, or architect, etc... that
become computer programmers?
I've worked with and known five/six hundred computer programmers. The good
computer programmers (if we define good as somewhat smart, fair ability to
think by themselves, decent ability to find and correct errors, etc..) were
always easily lost in their own worlds and easily confused by common
everyday events, and usually couldn't _both_ read and implement a
specification.. .(so it always took two). I still know dozens of programmers
who can't program a register or set and clear bits. And, from conversations
on other NG's I've _many_ CS majors tell me they don't know how to.
Rod Pemberton
"Rod Pemberton" <do*********@bi tfoad.cmmwrote in message
news:11******** *****@dscnews2. dcccd.edu...
>
"Richard Heathfield" <in*****@invali d.invalidwrote in message
news:Mf******** ************@bt .com...
>The kind of people who make good computer programmers are not the kind of people to be confused easily by the fact that a newsgroup might discuss
K&R
>C, C90, /and/ C99.
Ha Ha! Hilarious! I don't know how you can make such statements. Do you
actually have _any_ _real_ programming experience?
What people do you think become programmers in the US? Do you understand
that it is the people who have no chance of entering a higher paid field:
physicist, mathematician, electrical engineer, or architect, etc... that
become computer programmers?
Did you know that 10 years ago there were 2,000 millionaires at Microsoft?
I have worked with hundreds of programmers who get over $100/hour.
I've worked with and known five/six hundred computer programmers. The
good
computer programmers (if we define good as somewhat smart, fair ability to
think by themselves, decent ability to find and correct errors, etc..)
were
always easily lost in their own worlds and easily confused by common
everyday events, and usually couldn't _both_ read and implement a
specification.. .(so it always took two). I still know dozens of
programmers
who can't program a register or set and clear bits. And, from
conversations
on other NG's I've _many_ CS majors tell me they don't know how to.
My experience with programmers is not like yours. I wonder where you have
worked. I have run into a few incompetants, but they are unusual. I also
have a friend who has 500,000 lines of code perfectly memorized in his head.
He's at the other end of the spectrum.
Rod Pemberton
Rod Pemberton (in 11************* @dscnews2.dcccd .edu) said:
| "Richard Heathfield" <in*****@invali d.invalidwrote in message
| news:Mf******** ************@bt .com...
|| The kind of people who make good computer programmers are not the
|| kind of people to be confused easily by the fact that a newsgroup
|| might discuss K&R C, C90, /and/ C99.
|
| Ha Ha! Hilarious! I don't know how you can make such statements.
| Do you actually have _any_ _real_ programming experience?
Must be a troll - no one could be this clueless. At least he
recognizes that Richard is at the /other/ end of the bell-shaped
curve...
| What people do you think become programmers in the US? Do you
| understand that it is the people who have no chance of entering a
| higher paid field: physicist, mathematician, electrical engineer,
| or architect, etc... that become computer programmers?
Not very convincing assertion in this forum. Perhaps he really is
clueless...
| I've worked with and known five/six hundred computer programmers.
| The good computer programmers (if we define good as somewhat smart,
| fair ability to think by themselves, decent ability to find and
| correct errors, etc..) were always easily lost in their own worlds
| and easily confused by common everyday events, and usually couldn't
| _both_ read and implement a specification.. .(so it always took
| two). I still know dozens of programmers who can't program a
| register or set and clear bits. And, from conversations on other
| NG's I've _many_ CS majors tell me they don't know how to.
Ah, a bottom-feeder (they swim in schools).
--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA http://www.iedu.com/DeSoto
Rod Pemberton said:
>
"Richard Heathfield" <in*****@invali d.invalidwrote in message
news:Mf******** ************@bt .com...
>The kind of people who make good computer programmers are not the kind of people to be confused easily by the fact that a newsgroup might discuss
K&R
>C, C90, /and/ C99.
Ha Ha! Hilarious!
You are easily amused.
I don't know how you can make such statements.
I use a keyboard for typing the statement at a computer running a news
client. The news client takes care of posting the message to my news
server.
Do you actually have _any_ _real_ programming experience?
How could I possibly have any real programming experience, and yet disagree
with you? It just doesn't bear thinking about, does it?
What people do you think become programmers in the US?
I never mentioned the US. I also was not talking about "programmer s" in
general, but about "good programmers" - the kind that can spot adjectives,
the kind that realise there's more to the world than the US, the kind that
are capable of thinking clearly, as a good programmer must be able to do.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Richard Heathfield <in*****@invali d.invalidwrites :
jacob navia said:
>int main(void or int main(int argc,char *argv[])
you'd be wrong, because the first of your examples is a parenthesis short of
a declarator.
Pedantic and unnecessary.
>
The kind of people who make good computer programmers are not the kind of
people to be confused easily by the fact that a newsgroup might discuss K&R
C, C90, /and/ C99.
Are you sure? Not in comp.std.c, but here there are many good
programmers who come for help in C and generally only use one "standard"
of C. Noting wrong with pointing out "portable" techniques of course,
but being all big & clever over too many standards can and does confuse
many people. Not every one lives C : they use C to live.
Richard said:
Richard Heathfield <in*****@invali d.invalidwrites :
>jacob navia said:
>>int main(void or int main(int argc,char *argv[])
you'd be wrong, because the first of your examples is a parenthesis short of a declarator.
Pedantic and unnecessary.
Pedantic? Yes. Unnecessary? I'm not convinced.
>The kind of people who make good computer programmers are not the kind of people to be confused easily by the fact that a newsgroup might discuss K&R C, C90, /and/ C99.
Are you sure?
Yes.
Not in comp.std.c, but here there are many good
programmers who come for help in C and generally only use one "standard"
of C.
Sure. So do I. I doubt whether I've had to touch more than a dozen or so K&R
C programs, ever. Although I've taken the trouble to learn about C99, I
don't actually use it (except insofar as I have modified my C style to make
my programs legal in C99 as well as in C90). So I, too, only use one
"standard" of C. That doesn't mean I am necessarily confused by the fact
that this newsgroup might discuss programs written in K&R C or C99.
Noting wrong with pointing out "portable" techniques of course,
but being all big & clever over too many standards can and does confuse
many people.
Ideally, there would be one standard. This isn't an ideal world. But it is
possible to deal with the fact of multiple standards without making too
much of a fuss about it. And, when I'm giving advice to someone whose name
I don't recognise (and therefore might reasonably be expected to be new to
the group), I tend to play down the whole C90 vs C99 thing - not mentioning
it unless it's relevant, and if it /is/ relevant then only mentioning the
bits I have to, in as non-polemical a way as I can manage. If everybody
were like me, this newsgroup would be a perfect place. :-)
Not every one lives C : they use C to live.
I don't understand. <g,d&r>
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Richard Heathfield <in*****@invali d.invalidwrites :
Richard said:
>Richard Heathfield <in*****@invali d.invalidwrites :
>>jacob navia said: int main(void or int main(int argc,char *argv[])
you'd be wrong, because the first of your examples is a parenthesis short of a declarator.
Pedantic and unnecessary.
Pedantic? Yes. Unnecessary? I'm not convinced.
Which probably indicates you spend too long programming and not enough
in the real world. The thread had got to a depth where real programmers
were discussing. It is impolite and cocky, IMO, to point out an obvious
typo. After all, good programmers dont get so easily confused ... :-;
>>The kind of people who make good computer programmers are not the kind of people to be confused easily by the fact that a newsgroup might discuss K&R C, C90, /and/ C99.
Are you sure?
Yes.
I'm not. One of those beg to differ points I suppose.
>Not in comp.std.c, but here there are many good programmers who come for help in C and generally only use one "standard" of C.
Sure. So do I. I doubt whether I've had to touch more than a dozen or so K&R
C programs, ever. Although I've taken the trouble to learn about C99, I
don't actually use it (except insofar as I have modified my C style to make
my programs legal in C99 as well as in C90). So I, too, only use one
"standard" of C. That doesn't mean I am necessarily confused by the fact
that this newsgroup might discuss programs written in K&R C or C99.
Why would it? You've just advertised your knowledge of the others.
>
>Noting wrong with pointing out "portable" techniques of course, but being all big & clever over too many standards can and does confuse many people.
Ideally, there would be one standard. This isn't an ideal world. But
it is
Yes. We know. This is why this thread is now developing.
possible to deal with the fact of multiple standards without making too
much of a fuss about it. And, when I'm giving advice to someone whose name
I don't recognise (and therefore might reasonably be expected to be new to
the group), I tend to play down the whole C90 vs C99 thing - not mentioning
it unless it's relevant, and if it /is/ relevant then only mentioning the
bits I have to, in as non-polemical a way as I can manage. If
everybody
This is good practice : no doubt about it.
were like me, this newsgroup would be a perfect place. :-)
>Not every one lives C : they use C to live.
I don't understand. <g,d&r>
??
Dann Corbit wrote:
"Rod Pemberton" <do*********@bi tfoad.cmmwrote in message
news:11******** *****@dscnews2. dcccd.edu...
What people do you think become programmers in the US? Do you
understand that it is the people who have no chance of entering a
higher paid field: physicist, mathematician, electrical engineer,
or architect, etc... that become computer programmers?
I have worked with hundreds of programmers who get over $100/hour.
Remember that Pemberton is a troll. You're better off killfiling or at
least ignoring his rants.
Naturally, many current programmers were (and are still) engineers.
Brian
Richard Heathfield wrote:
Rod Pemberton said:
[who cares]
You are easily amused.
Why feed the troll?
Brian This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michelle Hillard |
last post by:
Hi guys, would appreciate if you can shed some light on this.
Sorry to be a pain, can you tell me what is wrong with the following:
for /F %%i in ('dir /b /on c:\bcp\pc*.txt') do bcp Inventory..pc in
%%i -fc:\bcp\bcp.fmt -T -S CHICKYy
where CHICKYy is the server
bcp.fmt
|
by: Linda Wienholt |
last post by:
I have two usercontrols on the home page of my website. They are intermitently sending incorrect HTML to the browser, which results in a textbox being rendered with the wrong width. Either both controls render correctly or both are incorrect but never a mixture. When they are rendered correctly the source looks like
<input name="Header2:txtKeyword" type="text" id="Header2_txtKeyword" style="width:80px;" /
When incorrect the source looks...
|
by: murphy |
last post by:
Hi,
I've been seeing two symptoms with my asp.net site that have started
recently after a long period of smooth running. As others on our team
make changes to referenced dll's I find that I get the following
errors from time to time.
Apparently the following procedure alleviates the problems:
-Reboot (clears locks on following directory)
|
by: murphy |
last post by:
Hi,
I've been seeing two symptoms with my asp.net site that have started
recently after a long period of smooth running. As others on our team
make changes to referenced dll's I find that I get the following
errors from time to time.
Apparently the following procedure alleviates the problems:
|
by: Peter Ritchie |
last post by:
Does anyone know how to suppress a specific warning for a line or block of
code in C#? C++ has a nice facility to disable a warning for a block of code
with #pragma for warnings that are incorrect or don't apply.
For example, the following code generates an CS0628 because CS0628 makes an
incorrect assumption that "protected" applies only to inheritance:
public sealed class Class
{
EmbeddedClass utility = new EmbeddedClass();
| |
by: ypjofficial |
last post by:
HI,
I have following terrific confusion.
class test
{
public:
int i;
int * j;
int **k;
|
by: mankolele |
last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Simple Database Connection</title>
</head>
<body bgcolor="white">
<?php
$connection = mysql_connect("localhost", "root", "phpmysql");
$select_db = mysql_select_db("procdumy", $connection);
|
by: trevor |
last post by:
Incorrect values when using float.Parse(string)
I have discovered a problem with float.Parse(string) not getting values
exactly correct in some circumstances(CSV file source) but in very
similar circumstances(XML file source) and with exactly the same value
it gets it perfectly correct all the time.
These are the results I got, XML is always correct, CSV are only
incorrect for some of the values (above about 0.01) but always gives
the...
|
by: ndawg123 |
last post by:
Hey guys what im trying to do is write a yatzee game with C.
And im stuck already and its the start?!?!
I want the user to type there 5 numbers.
i.e My program so far does this
Please enter dice Values:
|
by: roamnet |
last post by:
hi
i created database file with .mdf extention ,sql server as a source
and use grid view to display data
there're no problem in data retrieve and display,but i want to edit it
or insert new records
there is an error "Incorrect syntax near '-'.
Must declare the scalar variable "@UserName".
I worked out in design view,code is automatically generated.Iam not
able fix the error.
Iam working with Visual Web Developer-2005 Express Edition
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |