Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #12460
| From | "Paul" <pchrist<nospam>or@yahoo.co.uk> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: include |
| Date | 2011-12-13 18:38 +0000 |
| Organization | Netfront http://www.netfront.net/ |
| Message-ID | <jc863b$2bnf$1@adenine.netfront.net> (permalink) |
| References | <b30b3eb4-0845-4a64-aaef-b12b969f38b0@cs7g2000vbb.googlegroups.com> <d7521552-b496-429d-b8f2-cde89c60dcaa@r6g2000yqr.googlegroups.com> <4ee748a5$0$4378$7b1e8fa0@news.nbl.fi> <jc7hga$k9e$1@speranza.aioe.org> <slrnjef625.q8l.grahn+nntp@frailea.sa.invalid> |
"Jorgen Grahn" <grahn+nntp@snipabacken.se> wrote in message news:slrnjef625.q8l.grahn+nntp@frailea.sa.invalid... > On Tue, 2011-12-13, jacob navia wrote: >> Le 13/12/11 13:44, Juha Nieminen a écrit : >>> Nick Keighley<nick_keighley_nospam@hotmail.com> wrote: >>>> extern variables arn't really a good idea and their use should be >>>> minimised >>> >>> The very need for a "main.h" should be a clear sign that something's >>> horribly wrong with the design of the program. >> >> Why? >> >> main.h would declare variables that should be visible from >> main.c and submain.c and from no other file. >> >> Why not? >> >> submain.c needs to be independent from main.c since declares >> stuff that is not needed in main.c. main.h has the common >> subset of common symbols. > > "main.cpp" to me is something which only exposes one thing to the > outside: a main() function. If it exposes other things too, it needs a > more descriptive name IMO. Perhaps that is what Juha meant? > Many programs don't have a main function. main.cpp could contain the programs' main algorithms, its just a file name. If you have some kind of unwritten rule that a main.cpp file must always contain a main function thats all fine for you but please don't support Juha's statement that anything else is horribly wrong . If anything is horribly wrong its that attitude and you will usually find that people who have that attitude are usually wrong about most things. --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
include ahso <ahso47@yahoo.com> - 2011-12-13 01:45 -0800
Re: include Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-13 02:07 -0800
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-13 12:44 +0000
Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 13:47 +0100
Re: include Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-12-13 18:24 +0000
Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 19:30 +0100
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-13 18:38 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 18:47 +0000
Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 20:14 +0100
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 19:31 +0000
Re: include jacob navia <jacob@spamsink.net> - 2011-12-13 21:10 +0100
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:17 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:18 +0000
Re: include Dombo <dombo@disposable.invalid> - 2011-12-14 19:56 +0100
Re: include Ian Collins <ian-news@hotmail.com> - 2011-12-14 08:45 +1300
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:03 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-13 20:05 +0000
Re: include Ian Collins <ian-news@hotmail.com> - 2011-12-14 09:12 +1300
Re: include Tobias Müller <troplin@bluewin.ch> - 2011-12-14 09:31 +0000
Re: include Goran <goran.pusic@gmail.com> - 2011-12-14 07:06 -0800
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 15:35 +0000
Re: include Goran <goran.pusic@gmail.com> - 2011-12-14 23:19 -0800
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 12:37 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 12:38 +0000
Re: include Goran <goran.pusic@gmail.com> - 2011-12-15 06:12 -0800
Re: include Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-17 15:39 -0800
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 08:42 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 09:02 +0000
Re: include jacob navia <jacob@spamsink.net> - 2011-12-14 10:18 +0100
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 14:28 +0000
Re: include jacob navia <jacob@spamsink.net> - 2011-12-14 17:25 +0100
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 17:43 +0000
Re: include jacob navia <jacob@spamsink.net> - 2011-12-14 10:13 +0100
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 09:37 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-13 12:50 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 08:43 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 08:58 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 09:23 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 14:31 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 17:55 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 23:23 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-14 15:43 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-14 18:01 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 00:34 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-15 09:46 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 17:34 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 17:58 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 19:56 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 21:08 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 21:36 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 21:43 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 22:23 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 23:16 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-15 23:30 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-15 23:38 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 12:00 +0000
Re: include gwowen <gwowen@gmail.com> - 2011-12-16 04:22 -0800
Re: include 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-16 07:26 -0800
Re: include Goran <goran.pusic@gmail.com> - 2011-12-15 23:48 -0800
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 07:59 +0000
Re: include Goran <goran.pusic@gmail.com> - 2011-12-16 03:56 -0800
Re: include Goran <goran.pusic@gmail.com> - 2011-12-16 04:04 -0800
Re: include John Bokma <john@castleamber.com> - 2011-12-16 08:28 -0600
Re: include Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-17 15:51 -0800
Re: include gwowen <gwowen@gmail.com> - 2011-12-16 02:11 -0800
Re: include Goran <goran.pusic@gmail.com> - 2011-12-16 03:59 -0800
Re: include John Bokma <john@castleamber.com> - 2011-12-16 08:24 -0600
Re: include Tobias Müller <troplin@bluewin.ch> - 2011-12-16 15:55 +0000
Re: include "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-12-16 10:11 +0100
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 14:10 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 16:00 +0000
Re: include "io_x" <a@b.c.invalid> - 2011-12-18 18:07 +0100
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-18 17:11 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 11:49 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 14:04 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-16 16:19 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-16 18:37 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-17 07:35 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-17 14:34 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-17 14:47 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-17 19:52 +0000
Re: include Leigh Johnston <leigh@i42.co.uk> - 2011-12-17 20:03 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-17 23:11 +0000
Re: include Juha Nieminen <nospam@thanks.invalid> - 2011-12-19 10:14 +0000
Re: include "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2011-12-19 15:46 +0000
csiph-web