[OT] C++ Book Question (Was: Re: How to improve my question in stackoverflow?)

2021-09-09 Thread Linux-Fan
William Torrez Corea writes: Book.cpp:1:10: fatal error: Set: No existe el fichero o el directorio [closed] I trying compile an example of a book. The program use three classes: Book, Customer and Library. The question is offtopic for debian-user, how did it get here? Also, how are subject

OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Chris Brennan
Sorry for the cross post I hadn't seen any chatter about this on the lists. It would seem that Download.com got caught with their pants down and were re-wrapping F/OSS with their own installer and bundling adware, spyware and malware with it. NMap's author, over at insecure.org got pretty hot abou

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-02-01 Thread Kamaraju S Kusumanchi
H.S. wrote: >> There are more appropriate places than debian-user for C++ questions. > > Yes. There is a news group for C++, but the people there are topic > nazis. Anything not strictly related to the standard is promptly > flogged, hanged, skinned and left to dry. :) > > My query, however, was

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-01-30 Thread Robert Baron
When I have developed template code, I have always started by implementing the same algorithms without the templates. Once the non-template code works and is debugged, I convert it to the template. I have just found using real types is more convenient to think about, and to debug. gdb can be sli

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-01-30 Thread H.S.
Daniel Burrows wrote: > > Personally, I almost only use a debugger to get backtraces after a > crash. I find logging statements to be easier, more reliable, and more > useful. If you write cout<< statements directly into your code, of > course, it gets cluttered and unwieldly -- I would sugge

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-01-29 Thread Daniel Burrows
On Thu, Jan 29, 2009 at 01:47:27PM -0500, "H.S." was heard to say: > This is related to templates in C++ and debugging tools we have in Linux > (I use gdb, is there any other comparable open source tool?). Not that I know of. > I recall that a few years ago (a few version of gdb and gcc ago)

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-01-29 Thread H.S.
Mike Bird wrote: > > Maintaining one copy instead of two is (almost) always a good idea, > and one of the reasons why templates are so valuable. Yes, it is. But here there is this other factor of the suitability of gdb with templates and STL for debugging. I not sure I know the intricacies invol

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-01-29 Thread Eugene V. Lyubimkin
H.S. wrote: > Hello, > > This is related to templates in C++ and debugging tools we have in Linux > (I use gdb, is there any other comparable open source tool?). > > > What do C++ programmers here think about the usefulness of using > templates in C++ while keeping in mind how it would work with

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-01-29 Thread Mike Bird
On Thu January 29 2009 10:47:27 H.S. wrote: > Can C++ programmers here share their recent experience in this regard? I > have a program for an engineering problem of around 5000 lines and I > need to change some of the data variable from one type to another. > Currently I am of the mind to just cha

Re: [OT] C++ templates and debugging (limitations) in Linux

2009-01-29 Thread Nelson Castillo
On Thu, Jan 29, 2009 at 1:47 PM, H.S. wrote: > Hello, > > This is related to templates in C++ and debugging tools we have in Linux > (I use gdb, is there any other comparable open source tool?). > > > What do C++ programmers here think about the usefulness of using > templates in C++ while keeping

[OT] C++ templates and debugging (limitations) in Linux

2009-01-29 Thread H.S.
Hello, This is related to templates in C++ and debugging tools we have in Linux (I use gdb, is there any other comparable open source tool?). What do C++ programmers here think about the usefulness of using templates in C++ while keeping in mind how it would work with debugging that program usin

Re: OT: C++ help

2008-05-22 Thread Mike Bird
On Thu May 22 2008 10:49:25 Jordi Gutiérrez Hermoso wrote: > You keep talking about scope. The access specifier should affect scope > and name resolution? This does not make sense! The public function is > available, a using declaration should bring that function from A's > scope into B's scope, bu

Re: OT: C++ help

2008-05-22 Thread Jordi Gutiérrez Hermoso
On 22/05/2008, Mike Bird <[EMAIL PROTECTED]> wrote: > On Thu May 22 2008 06:34:27 Jordi Gutiérrez Hermoso wrote: > > The first thing to note is that neither of these is your original > example, so it would be better if you had written "the *only* > difference between the two examples above is the

Re: OT: C++ help

2008-05-22 Thread Mike Bird
On Thu May 22 2008 06:34:27 Jordi Gutiérrez Hermoso wrote: > On 21/05/2008, Mike Bird <[EMAIL PROTECTED]> wrote: > > On Wed May 21 2008 20:01:10 Jordi Gutiérrez Hermoso wrote: > > > So what's the fix here? Why does a using A::f declaration inside class > > > B not work? > > > > There's no f(int)

Re: OT: C++ help

2008-05-22 Thread Jordi Gutiérrez Hermoso
On 21/05/2008, Mike Bird <[EMAIL PROTECTED]> wrote: > On Wed May 21 2008 20:01:10 Jordi Gutiérrez Hermoso wrote: > > > So what's the fix here? Why does a using A::f declaration inside class > > B not work? > > > There's no f(int) in scope, only int(foo). No, no, wait. This makes no sense. Consid

Re: OT: C++ help

2008-05-22 Thread Hugo Vanwoerkom
Mike Bird wrote: On Wed May 21 2008 20:01:10 Jordi Gutiérrez Hermoso wrote: On 21/05/2008, Mike Bird <[EMAIL PROTECTED]> wrote: On Wed May 21 2008 19:00:27 Jordi Gutiérrez Hermoso wrote: > The problem seems to be that all of my functions being named f are > somehow colliding with each other.

Re: OT: C++ help

2008-05-21 Thread al davis
On Wednesday 21 May 2008, Jordi Gutiérrez Hermoso wrote: > The following code will not compile: > >      class foo{}; > >      class A{ >      public: >        void f(int a ){a++;}; >      private: >        virtual void f(foo a) = 0; >      }; > >      class B : public A{ >      private: >        v

Re: OT: C++ help

2008-05-21 Thread Mike Bird
On Wed May 21 2008 20:01:10 Jordi Gutiérrez Hermoso wrote: > On 21/05/2008, Mike Bird <[EMAIL PROTECTED]> wrote: > > On Wed May 21 2008 19:00:27 Jordi Gutiérrez Hermoso wrote: > > > The problem seems to be that all of my functions being named f are > > > somehow colliding with each other. > > > >

Re: OT: C++ help

2008-05-21 Thread Jordi Gutiérrez Hermoso
On 21/05/2008, Mike Bird <[EMAIL PROTECTED]> wrote: > On Wed May 21 2008 19:00:27 Jordi Gutiérrez Hermoso wrote: > > The problem seems to be that all of my functions being named f are > > somehow colliding with each other. > > > Annotated C++ Reference Manual, Ellis & Stroustrup, Section 13.1 >

Re: OT: C++ help

2008-05-21 Thread Mike Bird
On Wed May 21 2008 19:00:27 Jordi Gutiérrez Hermoso wrote: > The problem seems to be that all of my functions being named f are > somehow colliding with each other. Annotated C++ Reference Manual, Ellis & Stroustrup, Section 13.1 (Declaration Matching). "A function member of a derived class is no

OT: C++ help

2008-05-21 Thread Jordi Gutiérrez Hermoso
Feel free to redirect me to a better place to ask if you know of one. The following code will not compile: class foo{}; class A{ public: void f(int a ){a++;}; private: virtual void f(foo a) = 0; }; class B : public A{ private: virtual void

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-13 Thread Michelle Konzack
Am 2008-05-06 20:56:09, schrieb Jordi Gutiérrez Hermoso: > Although it's true that sometimes the C++ Hello World seems bloated to > the C Hello World, the difference becomes negligible in any project of > considerable size beyond Hello World. Embedded devices may be a > different thing, and I under

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/10/08 10:25, Chris Bannister wrote: > On Sat, May 10, 2008 at 08:35:25AM -0500, Ron Johnson wrote: >> Maybe. What I do know is that Perl's regex functionality has been >> *highly* optimized over the years. So, if the task is pattern >> matching

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-10 Thread Chris Bannister
On Sat, May 10, 2008 at 08:35:25AM -0500, Ron Johnson wrote: > Maybe. What I do know is that Perl's regex functionality has been > *highly* optimized over the years. So, if the task is pattern > matching over large datasets, Perl is the language to use, even over > compiled languages. Take a loo

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/08 22:47, H.S. wrote: > s. keeling wrote: > >> >> That's almost trivial. The datasets you see in the petrochemical >> industry can be in the terabyte range. They're so big, they have to >> edit in place, not write another output file. perl

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-09 Thread H.S.
s. keeling wrote: That's almost trivial. The datasets you see in the petrochemical industry can be in the terabyte range. They're so big, they have to edit in place, not write another output file. perl handles even this well. I/O performance is pretty much hardware bound. This is binary da

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-09 Thread H.S.
s. keeling wrote: Yes, and you need to do more research. and I skipped some other factors as well which contributed to not using an interpreted language. Perhaps in my next project, I will see how that goes. For this one, I am using bash, sed, perl and awk and gnuplot for post processing th

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-09 Thread s. keeling
H.S. <[EMAIL PROTECTED]>: > s. keeling wrote: > > Ron Johnson <[EMAIL PROTECTED]>: > >> Sorry. It just seems (to an old C programmer) that this is pretty > >> simple problem, unless there's some tricky detail that you aren't > >> telling us. > > > > That's exactly what I was thinking looking

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-09 Thread Jordi Gutiérrez Hermoso
On 09/05/2008, Ron Johnson <[EMAIL PROTECTED]> wrote: > Then write your apps in FORTRAN. (But then, you aren't the OP...) Sometimes I do, as a matter of fact, but I feel more comfortable with C++. > > You're not going to convince a numericist to give up compiled > > languages. :-) Give it up.

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/08 08:19, Jordi Gutiérrez Hermoso wrote: > On 09/05/2008, Ron Johnson <[EMAIL PROTECTED]> wrote: >> Remember, there's developer scale as well as execution scale. > > The execution scale is all that matters to us, since a wrong algorithm > or

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-09 Thread Jordi Gutiérrez Hermoso
On 09/05/2008, Ron Johnson <[EMAIL PROTECTED]> wrote: > Remember, there's developer scale as well as execution scale. The execution scale is all that matters to us, since a wrong algorithm or language can easily exacerbate execution times by orders of magnitude, while developer time hardly ever s

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/08/08 21:32, H.S. wrote: > s. keeling wrote: [snip] >> Man, does C++ produce ugly, obtuse code (no offence meant to C++ code >> posters; thanks), and this from a perl programmer. > > The problem may be quite trivial in the languages you mention

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-08 Thread H.S.
s. keeling wrote: Ron Johnson <[EMAIL PROTECTED]>: Sorry. It just seems (to an old C programmer) that this is pretty simple problem, unless there's some tricky detail that you aren't telling us. That's exactly what I was thinking looking at the problem. No offence None taken. meant to

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-08 Thread Jordi Gutiérrez Hermoso
On 08/05/2008, s. keeling <[EMAIL PROTECTED]> wrote: > Ron Johnson <[EMAIL PROTECTED]>: > > > > > On 05/06/08 13:25, H.S. wrote: > > > Ron Johnson wrote: > > >> > > >> Is this a binary file or a text file? > > > > > > hmm. Text. I made it clear in the original post. > > > > Sorry. It jus

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-08 Thread s. keeling
Ron Johnson <[EMAIL PROTECTED]>: > > On 05/06/08 13:25, H.S. wrote: > > Ron Johnson wrote: > >> > >> Is this a binary file or a text file? > > > > hmm. Text. I made it clear in the original post. > > Sorry. It just seems (to an old C programmer) that this is pretty > simple problem, unless t

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-08 Thread H.S.
James Allsopp wrote: hi, Try something like this, just add some pointers; scan is just a simple object and l is a class vector. HTH jim int nearest::readdata(std::string s, std::vector & l) { //read in scuba core list std::ifstream input(s.c_str()); std::string temp, pos, x ,y;

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-07 Thread Kevin B. McCarty
"H.S." wrote: > Michael Marsh wrote: >> Can you read full lines out into, eg, a stringstream, and parse your >> doubles out of that? You'd hit an EOF at the end of each line in that >> case. I'm not sure how you'd get stream out line-at-a-time, though >> there may be a stream op

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Jordi Gutiérrez Hermoso
On 06/05/2008, H.S. <[EMAIL PROTECTED]> wrote: > APRACK FORTRAN library needs the input data in a 2D array (the arrays need > to be arranged in column-major format). But, to answer your query, I don't > *have* to read it in an array, I could read it in a list and then copy it to > an array before

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Mark Allums
Jordi Gutiérrez Hermoso wrote: On 06/05/2008, H.S. <[EMAIL PROTECTED]> wrote: Yup, that fscanf method looks interesting. I used that only when I program in C, but it might be judicious to use it in C++ in this situation. It's not. Streams are better and keep you away from nasty errors and seg

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Mark Allums wrote: (And is also an example of something that is wrong with the C++ standard library, when you need the c_str() member of string so often to get any real useful work done. Kind of defeats the purpose of having string in the first place.) Yes, that c_str() is a nuisance many t

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Jordi Gutiérrez Hermoso wrote: On 06/05/2008, H.S. <[EMAIL PROTECTED]> wrote: homebrewed subpar methods instead of standard C++. If you're going to be reading doubles one by one, and you want to store those doubles and know how many you have, I see little reason to not use an std::list From the

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/06/08 13:25, H.S. wrote: > Ron Johnson wrote: >> >> Is this a binary file or a text file? > > hmm. Text. I made it clear in the original post. Sorry. It just seems (to an old C programmer) that this is pretty simple problem, unless there's som

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Mark Allums
James Allsopp wrote: hi, Try something like this, just add some pointers; scan is just a simple object and l is a class vector. HTH jim int nearest::readdata(std::string s, std::vector & l) { //read in scuba core list std::ifstream input(s.c_str()); std::string temp, pos, x ,y;

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Jordi Gutiérrez Hermoso
On 06/05/2008, H.S. <[EMAIL PROTECTED]> wrote: > If you have visited that, it is full of people who want to discuss only the > standard. The standard is nice. The standard is great. I love the standard. It can do everything, and when it can't, then you use Boost who does the rest. Wrapping other

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread James Allsopp
hi, Try something like this, just add some pointers; scan is just a simple object and l is a class vector. HTH jim int nearest::readdata(std::string s, std::vector & l) { //read in scuba core list std::ifstream input(s.c_str()); std::string temp, pos, x ,y; char * t; std::c

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Hal Vaughan
On Tuesday 06 May 2008, H.S. wrote: > Hal Vaughan wrote: > > On Tuesday 06 May 2008, H.S. wrote: > >> Ron Johnson wrote: > >>> Is this a binary file or a text file? > >> > >> hmm. Text. I made it clear in the original post. > > > > Ron has trouble keeping up with things like that. It's so hot > >

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Hal Vaughan wrote: On Tuesday 06 May 2008, H.S. wrote: Ron Johnson wrote: Is this a binary file or a text file? hmm. Text. I made it clear in the original post. Ron has trouble keeping up with things like that. It's so hot where he lives his brain is often overheated with the lest bit of m

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Hal Vaughan
On Tuesday 06 May 2008, H.S. wrote: > Ron Johnson wrote: > > Is this a binary file or a text file? > > hmm. Text. I made it clear in the original post. Ron has trouble keeping up with things like that. It's so hot where he lives his brain is often overheated with the lest bit of mental effort.

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Ron Johnson wrote: Is this a binary file or a text file? hmm. Text. I made it clear in the original post. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Hal Vaughan
On Tuesday 06 May 2008, Ron Johnson wrote: > On 05/06/08 12:50, H.S. wrote: > > Robert Baron wrote: > >> What is so terrible about counting the items as they come in? > > > > As I mentioned earlier, the issue is how do I count items read in > > one line, or before the next EOL? Counting total items

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Michael Marsh wrote: On Tue, May 6, 2008 at 1:50 PM, H.S. <[EMAIL PROTECTED]> wrote: As I mentioned earlier, the issue is how do I count items read in one line, or before the next EOL? Counting total items is not a problem. Perhaps a different way to say this is, how do I detect if I have rea

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/06/08 12:50, H.S. wrote: > Robert Baron wrote: > >> >> What is so terrible about counting the items as they come in? > > > As I mentioned earlier, the issue is how do I count items read in one > line, or before the next EOL? Counting total ite

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Michael Marsh
On Tue, May 6, 2008 at 1:50 PM, H.S. <[EMAIL PROTECTED]> wrote: > As I mentioned earlier, the issue is how do I count items read in one line, > or before the next EOL? Counting total items is not a problem. > > Perhaps a different way to say this is, how do I detect if I have reached > an EOL whi

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Robert Baron wrote: What is so terrible about counting the items as they come in? As I mentioned earlier, the issue is how do I count items read in one line, or before the next EOL? Counting total items is not a problem. Perhaps a different way to say this is, how do I detect if I have r

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread Robert Baron
On Tue, May 6, 2008 at 1:14 PM, H.S. <[EMAIL PROTECTED]> wrote: > Jordi Gutiérrez Hermoso wrote: > > > On 06/05/2008, H.S. <[EMAIL PROTECTED]> wrote: > > > > > In a C++ program I am reading a data file for later processing and > > > computations. While reading that data file, I want to keep track

Re: [OT] C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Jordi Gutiérrez Hermoso wrote: On 06/05/2008, H.S. <[EMAIL PROTECTED]> wrote: In a C++ program I am reading a data file for later processing and computations. While reading that data file, I want to keep track of data items (doubles) read. Use std::list and other standard data structures. I

Re: [OT] c programming mailing list

2006-04-27 Thread Mike McCarty
Michael M. wrote: Mike McCarty wrote: John Hasler wrote: Juraj Fedel wrote: I do not like to use newgroups Why? One reason I don't use them is that they cost additional money, whereas e-mail comes with the ISP package. Mike You know there are any number of public usenet servers av

Re: [OT] c programming mailing list

2006-04-27 Thread Michael M.
Mike McCarty wrote: John Hasler wrote: Juraj Fedel wrote: I do not like to use newgroups Why? One reason I don't use them is that they cost additional money, whereas e-mail comes with the ISP package. Mike You know there are any number of public usenet servers available? Some, I'm sure

Re: [OT] c programming mailing list

2006-04-27 Thread Josh Battles
On Thu, April 27, 2006 12:30 pm, Mike McCarty wrote: > John Hasler wrote: >> Juraj Fedel wrote: >> >>>I do not like to use newgroups >> >> >> Why? > > One reason I don't use them is that they cost additional money, whereas > e-mail comes with the ISP package. My ISP gives me 20GB of monthly transf

Re: [OT] c programming mailing list

2006-04-27 Thread Mike McCarty
John Hasler wrote: Juraj Fedel wrote: I do not like to use newgroups Why? One reason I don't use them is that they cost additional money, whereas e-mail comes with the ISP package. Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} This message made from 100% recyc

Re: [OT] c programming mailing list

2006-04-24 Thread John Hasler
Juraj Fedel wrote: > I do not like to use newgroups Why? -- John Hasler -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: [OT] c programming mailing list

2006-04-24 Thread Mike McCarty
Juraj Fedel wrote: Can anybody recommend some mailing list eqivalent or similar to news://comp.lang.c (I do not like to use newgroups)? Umm, comp.lang.c is not about programming, it's about a language. There's a difference. Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,3

Re: [OT] c programming mailing list

2006-04-23 Thread Björn Lindström
Juraj Fedel <[EMAIL PROTECTED]>: > Can anybody recommend some mailing list eqivalent or similar to > news://comp.lang.c (I do not like to use newgroups)? My recommendation would be to get over it and read the newsgroup. Since I see you use Mutt I would recommend checking out http://mutt-ng.berli

[OT] c programming mailing list

2006-04-22 Thread Juraj Fedel
Can anybody recommend some mailing list eqivalent or similar to news://comp.lang.c (I do not like to use newgroups)? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: [DEB-USER] OT: C++ mailing list sought

2004-02-22 Thread Paul M Foster
On Sun, Feb 22, 2004 at 05:59:15PM +0100, martin f krafft wrote: > Please forgive me asking this question here. Since accu.org charges > for mailing list access and the Cpp list @topica was pretty bad when > I last checked it out (or is this not the case anymore?), I am > looking for a C++ mailing

Re: OT: C++ mailing list sought

2004-02-22 Thread Gregory Seidman
On Sun, Feb 22, 2004 at 05:59:15PM +0100, martin f krafft wrote: } Please forgive me asking this question here. Since accu.org charges } for mailing list access and the Cpp list @topica was pretty bad when } I last checked it out (or is this not the case anymore?), I am } looking for a C++ mailing

OT: C++ mailing list sought

2004-02-22 Thread martin f krafft
Please forgive me asking this question here. Since accu.org charges for mailing list access and the Cpp list @topica was pretty bad when I last checked it out (or is this not the case anymore?), I am looking for a C++ mailing list for general discussion and problem solving. I wouldn't mind if it's

Re: [OT] C programming, variable size array

2003-12-14 Thread Micha Feigin
On Fri, Dec 12, 2003 at 08:38:18PM +0200, Aryan Ameri wrote: > Hi There: > > I am a first year CS student, learning C. A while ago I was asked this > question from a fellow friend of mine: > > "Write a program, which promts the uset to enter some numbers. The user > should terminate the sequenc

debian community (was Re: [OT] C programming, variable size array)

2003-12-14 Thread Clive Standbridge
On Sat 13 Dec 2003 08:13:09 +(-0500), Paul Morgan wrote: > > BTW, the debian community deserves a lot of credit for their QA work. > Doing QA sucks for the most part, and most folks do their level best to > avoid being part of it. And yet debian, this cloud of volunteers from all > over the

Re: [OT] C programming, variable size array

2003-12-13 Thread Nunya
On Sat, Dec 13, 2003 at 08:53:50PM -0800, Nunya wrote: > I'm almost positive the prof. just wanted the guy to use malloc s/malloc/malloc+realloc/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: [OT] C programming, variable size array

2003-12-13 Thread Nunya
On Sat, Dec 13, 2003 at 09:33:46PM -0700, Paul E Condon wrote: > cheating. But, from my experience as a univerisity professor, I know > that the 'rules of the game' are rather different for homework than > they are for the real world. A homework problem that is of the form " > construct a system th

Re: [OT] C programming, variable size array

2003-12-13 Thread Paul E Condon
On Sat, Dec 13, 2003 at 12:31:00AM -0600, Alex Malinovich wrote: > On Fri, 2003-12-12 at 15:00, Aryan Ameri wrote: > > On Friday 12 December 2003 22:38, Alex Malinovich wrote: > > > On Fri, 2003-12-12 at 14:04, Wesley J Landaker wrote: > > > > On Friday 12 December 2003 11:38 am, Aryan Ameri wrote:

Re: [OT] C programming, variable size array

2003-12-13 Thread Hugo Vanwoerkom
Debian User wrote: if you really have to do it in a low-level language, do it in assembly native to that processor. you can even write them inline within your C code. asm(" mnemonic_instruction operand, operand"); Debian User wrote: > if you really have to do it in a low-level language, do it

Re: [OT] C programming, variable size array

2003-12-13 Thread Paul Morgan
On Fri, 12 Dec 2003 16:57:12 -0500, Hubert Chan wrote: > > >> "John" == John Smith <[EMAIL PROTECTED]> writes: > > John> #include > John> int main > John> ( > John>int nNumberofArguments, > > Your variable names are too long, which decreases readability. Having > such a long name do

Re: [OT] C programming, variable size array

2003-12-13 Thread Paul Morgan
On Fri, 12 Dec 2003 17:56:54 -0700, Monique Y. Herman wrote: > On Fri, 12 Dec 2003 at 23:40 GMT, Paul Morgan penned: > [snip] >> >> In the real world: >> >> Do the simplest thing that is consistent with the specification. >> Someone, whose skill level you can't predict, is going to have to >> ma

Re: [OT] C programming, variable size array

2003-12-13 Thread Scarletdown
What the? How did that end up getting sent to this group? Anyways, please disregard that message, as It is obviously just a screw up on my part during my attempts to get outbound email working properly. On 12 Dec 2003 at 22:35, Scarletdown FeatherTail wrote: > d > q > > > -- > To UNSUBS

Re: [OT] C programming, variable size array

2003-12-13 Thread Scarletdown FeatherTail
d q -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: [OT] C programming, variable size array

2003-12-12 Thread Alex Malinovich
On Fri, 2003-12-12 at 15:00, Aryan Ameri wrote: > On Friday 12 December 2003 22:38, Alex Malinovich wrote: > > On Fri, 2003-12-12 at 14:04, Wesley J Landaker wrote: > > > On Friday 12 December 2003 11:38 am, Aryan Ameri wrote: > > > > Hi There: > > > > Hmmm... sounds a lot like a homework problem.

Re: [OT] C programming, variable size array

2003-12-12 Thread Monique Y. Herman
On Fri, 12 Dec 2003 at 23:40 GMT, Paul Morgan penned: [snip] > > In the real world: > > Do the simplest thing that is consistent with the specification. > Someone, whose skill level you can't predict, is going to have to > maintain it after you. Corollary: Regardless of the skill level of the pe

Re: [OT] C programming, variable size array

2003-12-12 Thread Frank Gevaerts
On Fri, Dec 12, 2003 at 08:38:18PM +0200, Aryan Ameri wrote: > Hi There: > > I am a first year CS student, learning C. A while ago I was asked this > question from a fellow friend of mine: > > "Write a program, which promts the uset to enter some numbers. The user > should terminate the sequenc

Re: [OT] C programming, variable size array

2003-12-12 Thread Paul Morgan
On Fri, 12 Dec 2003 20:38:18 +0200, Aryan Ameri wrote: > Hi There: > > I am a first year CS student, learning C. A while ago I was asked this > question from a fellow friend of mine: > > "Write a program, which promts the uset to enter some numbers. The user > should terminate the sequence of

Re: [OT] C programming, variable size array

2003-12-12 Thread Hubert Chan
> "Aryan" == Aryan Ameri <[EMAIL PROTECTED]> writes: [...] Aryan> About initializing the array as static, well I thought that way, Aryan> when I reinitialize it, I would be able to save it's contents (if Aryan> you know what I mean). I was afraid that if it was a automatic Aryan> array, when

Re: [OT] C programming, variable size array

2003-12-12 Thread Wesley J Landaker
On Friday 12 December 2003 1:41 pm, Aryan Ameri wrote: > On Friday 12 December 2003 22:04, Wesley J Landaker wrote: > > Something like this would work if you fill in some of the blanks: > > > > int main() { > > int *array = malloc(sizeof(int)); > > int size = 0; > > printf("Enter Number\n");

Re: [OT] C programming, variable size array

2003-12-12 Thread Colin Watson
On Fri, Dec 12, 2003 at 10:21:36PM +0100, John Smith wrote: > #include > > int main > ( >int nNumberofArguments, >char* apszArgument [] > ) Hungarian notation! Ugh! -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] wi

Re: [OT] C programming, variable size array

2003-12-12 Thread Hubert Chan
> "John" == John Smith <[EMAIL PROTECTED]> writes: John> #include John> int main John> ( John>int nNumberofArguments, Your variable names are too long, which decreases readability. Having such a long name does not convey any more information than a shorter name such as "numArgs" (or

Re: [OT] C programming, variable size array

2003-12-12 Thread Hubert Chan
> "Wesley" == Wesley J Landaker <[EMAIL PROTECTED]> writes: [...] Wesley> It would be better to allocate memory in chunks, ... Yes. If you reallocate for every number you read, then it takes O(n^2) time to read n numbers (assuming realloc has to relocate the data every time). If you make y

Re: [OT] C programming, variable size array

2003-12-12 Thread Hubert Chan
> "Alex" == Alex Malinovich <[EMAIL PROTECTED]> writes: [...] Alex> And I wouldn't even bother putting the linked list into an array Alex> in the first place. If you write a good linked list implementation Alex> (which, as I said, would be a good exercise) it will already Alex> support all of

Re: [OT] C programming, variable size array

2003-12-12 Thread Mark Roach
On Fri, 2003-12-12 at 16:00, Aryan Ameri wrote: [...] > To the person who suggested the linked-list thing to me. Thanks very > much. I don't know what they are yet, but it seems something really > interesting. I'll go back to my cave now, to study them. Hi, another thing you might want to check

Re: [OT] C programming, variable size array

2003-12-12 Thread Aryan Ameri
On Friday 12 December 2003 22:38, Alex Malinovich wrote: > On Fri, 2003-12-12 at 14:04, Wesley J Landaker wrote: > > On Friday 12 December 2003 11:38 am, Aryan Ameri wrote: > > > Hi There: > > Hmmm... sounds a lot like a homework problem... =) > > Yes, it does... :) See, this is what I was afrai

Re: [OT] C programming, variable size array

2003-12-12 Thread Aryan Ameri
On Friday 12 December 2003 22:04, Wesley J Landaker wrote: > On Friday 12 December 2003 11:38 am, Aryan Ameri wrote: > > #include > > > > main() > > { > > int tmp, cnt = 0; > > static int arr[cnt]; > > printf( "Enter Number\n"); > > scanf( "%d", &tmp); > > while ( (tmp = getchar() ) != EOF ) { >

Re: [OT] C programming, variable size array

2003-12-12 Thread Nunya
On Fri, Dec 12, 2003 at 08:38:18PM +0200, Aryan Ameri wrote: > > "Write a program, which promts the uset to enter some numbers. The user > should terminate the sequence of numbers by entering EOF character. The > program should put numbers entered by the user in to a 1D array". The real answer

Re: [OT] C programming, variable size array

2003-12-12 Thread John Smith
#include int main ( int nNumberofArguments, char* apszArgument [] ) { int nReturncode = 0 ; int* pnStorage = NULL ; int* pnTmp = NULL ; int nNumberofelements = 0 ; int nNumberofreadfields = 0 ; int nCounter = 0 ; int nInput = 0 ; while ((nReturncode == 0) && ((nN

Re: [OT] C programming, variable size array

2003-12-12 Thread Wesley J Landaker
On Friday 12 December 2003 1:46 pm, Debian User wrote: > if you really have to do it in a low-level language, do it in > assembly native to that processor. you can even write them inline > within your C code. > > asm(" mnemonic_instruction operand, operand"); > Hey, I wouldn't be surprised if some

Re: [OT] C programming, variable size array

2003-12-12 Thread Wesley J Landaker
On Friday 12 December 2003 1:42 pm, s. keeling wrote: > Incoming from Wesley J Landaker: > Content-Description: signed data > > > On Friday 12 December 2003 11:38 am, Aryan Ameri wrote: > > > I am a first year CS student, learning C. A while ago I was asked > > > this question from a fellow friend

Re: [OT] C programming, variable size array

2003-12-12 Thread Debian User
if you really have to do it in a low-level language, do it in assembly native to that processor. you can even write them inline within your C code. asm(" mnemonic_instruction operand, operand"); At Friday, 12 December 2003, Alex Malinovich <[EMAIL PROTECTED] shack.net> wrote: >On Fri, 2003-12

Re: [OT] C programming, variable size array

2003-12-12 Thread s. keeling
Incoming from Wesley J Landaker: Content-Description: signed data > On Friday 12 December 2003 11:38 am, Aryan Ameri wrote: > > > > I am a first year CS student, learning C. A while ago I was asked > > this question from a fellow friend of mine: > > Hmmm... sounds a lot like a homework problem...

Re: [OT] C programming, variable size array

2003-12-12 Thread Alex Malinovich
On Fri, 2003-12-12 at 14:04, Wesley J Landaker wrote: > On Friday 12 December 2003 11:38 am, Aryan Ameri wrote: > > Hi There: > > > > I am a first year CS student, learning C. A while ago I was asked > > this question from a fellow friend of mine: > > > > "Write a program, which promts the uset to

Re: [OT] C programming, variable size array

2003-12-12 Thread Wesley J Landaker
On Friday 12 December 2003 11:38 am, Aryan Ameri wrote: > Hi There: > > I am a first year CS student, learning C. A while ago I was asked > this question from a fellow friend of mine: > > "Write a program, which promts the uset to enter some numbers. The > user should terminate the sequence of numb

[OT] C programming, variable size array

2003-12-12 Thread Aryan Ameri
Hi There: I am a first year CS student, learning C. A while ago I was asked this question from a fellow friend of mine: "Write a program, which promts the uset to enter some numbers. The user should terminate the sequence of numbers by entering EOF character. The program should put numbers ent

Re: OT: C++

2003-12-05 Thread ian
TR wrote: On Wed, 03 Dec 2003 16:10:28 -0500 Jeff Elkins <[EMAIL PROTECTED]> wrote: I'm teaching myself C++ (for development on the Zaurus ) and am at the baby step stage...I've been able to compile a few useful programs but have run into some roadblocks that this infant doesn't understand. I b

  1   2   >