Effective C++ Programming Workshop Embedded C Workshop(6-8thJuly) - Penang/KL -JUL 11-15th 2011 - Confirmation by JUN 30th

2011-06-16 Thread embeddedact-seminar
Effective C++ Programming Workshop -Singapore -OCT 11-15th 2010 The C++ Language Basics A quick contrast on features of C++ C A simple C++ program A C++ build Phase Exploring GNU Tool chains for debugging skills Cascading of I/O operators Type compatibility Scope resolution operator

Re: C programming, checking for ^C

2011-02-22 Thread Steven Ayre
And don't forget to call usleep() or something similar for a short period of time if you're not doing anything in the loop except waiting for Ctrl-C. How short depends on how responsive you want it to be. Otherwise you'll end up with a loop that's constantly looping going round and round and

C programming, checking for ^C

2011-02-21 Thread T o n g
Hi, I need to check for ^C in an endless loop that doesn't do any stdio. How can I do that? Back in DOS days, I used to use kbhit() from CONIO.H, which checks for currently available keystrokes. Is there similar things under Linux gcc? Thanks -- Tong (remove underscore(s) to reply)

Re: C programming, checking for ^C

2011-02-21 Thread Boyd Stephen Smith Jr.
In ijvej5$q7s$1...@dough.gmane.org, T o n g wrote: I need to check for ^C in an endless loop that doesn't do any stdio. How can I do that? Back in DOS days, I used to use kbhit() from CONIO.H, which checks for currently available keystrokes. Is there similar things under Linux gcc? Ctrl+C will

[Solved] C programming question

2010-04-17 Thread Stephen Powell
Thanks to all who contributed to this thread, especially to Boyd. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive:

Re: C programming question

2010-04-16 Thread Stephen Powell
On Thu, 15 Apr 2010 21:09:43 -0400 (EDT), Stephen Powell wrote: On Thu, 15 Apr 2010 20:43:21 -0400 (EDT), Ron Johnson wrote: On 2010-04-15 19:37, Stephen Powell wrote: I'm going to be filing a bug report against parted for (a) miscalculating the starting block of the implicit partition on an

Re: C programming question

2010-04-16 Thread Boyd Stephen Smith Jr.
In 1876691691.55741.1271378240260.javamail.r...@md01.wow.synacor.com, Stephen Powell wrote: I'm going to be filing a bug report against parted for (a) miscalculating the starting block of the implicit partition on an ldl (Linux Disk Layout) formatted disk on the s390 architecture when the block

Re: C programming question

2010-04-16 Thread Stephen Powell
On Fri, 16 Apr 2010 14:13:36 -0400 (EDT), Boyd Stephen Smith Jr. wrote: Stephen Powell wrote: I'm going to be filing a bug report against parted for (a) miscalculating the starting block of the implicit partition on an ldl (Linux Disk Layout) formatted disk on the s390 architecture when the

Re: C programming question

2010-04-15 Thread Stephen Powell
On Wed, 14 Apr 2010 23:10:55 -0400 (EDT), Boyd Stephen Smith Jr. wrote: On Tuesday 13 April 2010 17:16:03 Stephen Powell wrote: What I need to do is to have two structures overlay each other; so that they occupy the same storage. To be specific, here is a structure which describes the

Re: C programming question

2010-04-15 Thread Boyd Stephen Smith Jr.
On Thursday 15 April 2010 13:56:00 Stephen Powell wrote: On Wed, 14 Apr 2010 23:10:55 -0400 (EDT), Boyd Stephen Smith Jr. wrote: On Tuesday 13 April 2010 17:16:03 Stephen Powell wrote: What I need to do is to have two structures overlay each other; so that they occupy the same storage. To

Re: C programming question

2010-04-15 Thread Stephen Powell
On Thu, 15 Apr 2010 17:39:42 -0400 (EDT), Boyd Stephen Smith Jr. wrote: Stephen Powell wrote: In short, I need to (a) declare cms_label as a based structure, (above; trimmmed) (b) declare a pointer variable called cms_ptr and associate it with the cms_label structure, struct cms_label

Re: C programming question

2010-04-15 Thread Ron Johnson
On 2010-04-15 19:37, Stephen Powell wrote: [snip] I'm going to be filing a bug report against parted for (a) miscalculating the starting block of the implicit partition on an ldl (Linux Disk Layout) formatted disk on the s390 architecture when the block size is other than 4096, and (b) no

Re: C programming question

2010-04-15 Thread Stephen Powell
On Thu, 15 Apr 2010 20:43:21 -0400 (EDT), Ron Johnson wrote: On 2010-04-15 19:37, Stephen Powell wrote: I'm going to be filing a bug report against parted for (a) miscalculating the starting block of the implicit partition on an ldl (Linux Disk Layout) formatted disk on the s390 architecture

Re: C programming question

2010-04-14 Thread Paul E Condon
On 20100413_193540, Robert Baron wrote: What a great little learning project. My suggestion is to work out a simpler version of what you are trying to do: typedef struct { unsigned short rec_type; long data; } type1; typedef struct { unsigned short rec_type; char

Re: C programming question

2010-04-14 Thread Hugo Vanwoerkom
Stephen Powell wrote: I realize that this is not a C forum, per se, but this is a Debian-specific C question. I am trying to add support to the parted utility for CMS-formatted disks on the s390 architecture. The source code is written in C, of course. But I am not a C programmer. I can spell

Re: C programming question

2010-04-14 Thread Ron Johnson
On 2010-04-14 09:31, Paul E Condon wrote: [snip] non-obvious --- to the point that there was an open contest with prizes awarded for the most obfuscated example of C code. The prizes went to the code for which the judges were most surprised on seeing it run after they read the code and tried to

Re: C programming question

2010-04-14 Thread John Hasler
Ron Johnson writes: Unions have been in C for at least 20 years; probably since the Early Days. Unions are in the first edition of KR. -- John Hasler -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Re: C programming question [OT]

2010-04-14 Thread thib
Ron Johnson wrote: [snip] http://www1.us.ioccc.org/main.html I guess they got bored looking at normal production C code... Sometimes, I find the code there even more impressive: http://underhanded.xcott.com/ It's even more restricted, and not so pointless. Hiding in plain sight,

Re: C programming question

2010-04-14 Thread Paul E Condon
, and Kernighan, The C Programming Language, in Bell System Technical Journal of JULY-AUGUST 1978, p. 1991. At that time the Bell System had C compilers running on PDP-11, Honeywell 6000, IBM System/370, and Interdata 8/32. You're right. 20years. -- Paul E Condon pecon...@mesanetworks.net

Re: C programming question

2010-04-14 Thread Boyd Stephen Smith Jr.
On Tuesday 13 April 2010 17:16:03 Stephen Powell wrote: What I need to do is to have two structures overlay each other; so that they occupy the same storage. To be specific, here is a structure which describes the volume label for an OS-formatted disk: struct __attribute__ ((packed))

C programming question

2010-04-13 Thread Stephen Powell
I realize that this is not a C forum, per se, but this is a Debian-specific C question. I am trying to add support to the parted utility for CMS-formatted disks on the s390 architecture. The source code is written in C, of course. But I am not a C programmer. I can spell C, but that's about it.

Re: C programming question

2010-04-13 Thread Ron Johnson
On 2010-04-13 17:16, Stephen Powell wrote: I realize that this is not a C forum, per se, but this is a Debian-specific C question. I am trying to add support to the parted utility for CMS-formatted [snip] I know how to do this in PL/I, but despite having spent the last two hours paging

RE: C programming question

2010-04-13 Thread Mike Viau
Tue, 13 Apr 2010 17:29:51 -0500 ron.l.john...@cox.net wrote: On 2010-04-13 17:16, Stephen Powell wrote: I realize that this is not a C forum, per se, but this is a Debian-specific C question. I am trying to add support to the parted utility for CMS-formatted [snip] I know how to

Re: C programming question

2010-04-13 Thread Robert Baron
What a great little learning project. My suggestion is to work out a simpler version of what you are trying to do: typedef struct { unsigned short rec_type; long data; } type1; typedef struct { unsigned short rec_type; char data[4]; } type2; . some_type *chunk_of_mem; long

Re: what's the best IDE for C programming in Debian?

2008-08-12 Thread James Youngman
On Sat, Aug 9, 2008 at 6:09 AM, Andrew Sackville-West [EMAIL PROTECTED] wrote: Seeing how powerful it is, but knowing how powerful emacs is, or can be, I wonder what emacs based tools exist for performing similarly in emacs? A few pointers to some more powerful code tools in emacs would be

Re: what's the best IDE for C programming in Debian?

2008-08-12 Thread mike
Have you let Emacs into your heart? Are you typing in its holy word, brother? Amen brother! Praise RMS -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: what's the best IDE for C programming in Debian?

2008-08-11 Thread Johann Spies
On Fri, Aug 08, 2008 at 10:09:32PM -0700, Andrew Sackville-West wrote: I have used just enough emacs to learn that it is an amazing tool. I'm not downplaying vim. I use vim daily. It is my editor of choice for config files. I don't know why, it just is. Years ago I was editing a file of

Re: what's the best IDE for C programming in Debian?

2008-08-09 Thread Sven Joachim
On 2008-08-09 07:09 +0200, Andrew Sackville-West wrote: But emacs I've used for writing code. Not a lot of code, but enough to get the basic stuff wired in. I also use it as a general purpose editor (it's my default editor in mutt, for example, with it's own .emacs just for mutt, so I don't

Re: what's the best IDE for C programming in Debian?

2008-08-09 Thread Ron Johnson
On 08/09/08 01:19, Sven Joachim wrote: On 2008-08-09 07:09 +0200, Andrew Sackville-West wrote: But emacs I've used for writing code. Not a lot of code, but enough to get the basic stuff wired in. I also use it as a general purpose editor (it's my default editor in mutt, for example, with it's

Re: what's the best IDE for C programming in Debian?

2008-08-09 Thread Andrew Sackville-West
On Sat, Aug 09, 2008 at 08:19:14AM +0200, Sven Joachim wrote: On 2008-08-09 07:09 +0200, Andrew Sackville-West wrote: But emacs I've used for writing code. Not a lot of code, but enough to get the basic stuff wired in. I also use it as a general purpose editor (it's my default editor in

Re: what's the best IDE for C programming in Debian?

2008-08-09 Thread Antonio Diaz
Hi, I have been using Vim and Emacs for years but I've to admit that Netbeans and Eclipse are really great, specialized IDEs for these kind of tasks. I'd try some of them. For example, last two years I've been developing in C++ for my company and Netbeans has all you need and more:

Re: what's the best IDE for C programming in Debian?

2008-08-09 Thread Sven Joachim
On 2008-08-09 10:23 +0200, Andrew Sackville-West wrote: but will those instance of emacsclient start up with their own version of .emacs tailored to that specific use? If so, then I'm all for it. (I know, the proof is in the execution) No, but why is there a need for it? Probably you want a

Re: what's the best IDE for C programming in Debian?

2008-08-09 Thread Dave Sherohman
On Sat, Aug 09, 2008 at 02:44:55AM -0500, Ron Johnson wrote: That seems redundant, since Emacs is the OS, and thus is running soon after POST. Does that age me? Emacs-as-OS comments just don't have the same impact when using a 2GB AMD 64X2 machine as they on a 8MB Sun3... Nah, I'd say

Re: what's the best IDE for C programming in Debian?

2008-08-08 Thread Michelle Konzack
Am 2008-07-31 22:21:40, schrieb Star Liu: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! mc -- Midnight Comander:-D Thanks, Greetings and nice Day/Evening Michelle Konzack

Re: what's the best IDE for C programming in Debian?

2008-08-08 Thread Michelle Konzack
Am 2008-07-31 22:21:40, schrieb Star Liu: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! Maybe you schould try rhide I use it since 15 years. Thanks, Greetings and nice Day/Evening

Re: what's the best IDE for C programming in Debian?

2008-08-08 Thread Michelle Konzack
Am 2008-07-31 13:03:15, schrieb Dave Sherohman: I guess I must be one of the older people, too, as my standard DIDE (dis-integrated development environment) consists of several xterms running vim (or other tools as needed), plus a web browser for looking up any extra information I may need.

Re: what's the best IDE for C programming in Debian?

2008-08-08 Thread Jordi Gutiérrez Hermoso
2008/8/1 Star Liu [EMAIL PROTECTED]: I'm really happy to get so much good suggestions, I will try the following tools one by one, and send my use reports to this mail thread. I feel that the first one I want to try is codeblocks. Well, whatever works... emacs vim If I may so interject

Re: what's the best IDE for C programming in Debian?

2008-08-08 Thread Star Liu
On Sat, Aug 9, 2008 at 11:26 AM, Jordi Gutiérrez Hermoso [EMAIL PROTECTED] wrote: 2008/8/1 Star Liu [EMAIL PROTECTED]: I'm really happy to get so much good suggestions, I will try the following tools one by one, and send my use reports to this mail thread. I feel that the first one I want to

Re: what's the best IDE for C programming in Debian?

2008-08-08 Thread Star Liu
another choice for IDE is monodevelop, but it seems very few debian people use it, though i can install the 1.0 version from debian package, but i failed to compile the new version(1.9.1) from source code on sid. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe.

Re: what's the best IDE for C programming in Debian?

2008-08-08 Thread Andrew Sackville-West
On Fri, Aug 08, 2008 at 10:26:42PM -0500, Jordi Gutiérrez Hermoso wrote: 2008/8/1 Star Liu [EMAIL PROTECTED]: I'm really happy to get so much good suggestions, I will try the following tools one by one, and send my use reports to this mail thread. I feel that the first one I want to try is

RE:Re: what's the best IDE for C programming in Debian?

2008-08-01 Thread abdelkader belahcene
hi, I ve just found codeblocks, that your are looking for I think. see http://www.codeblocks.org/downloads best regards bela

Re: what's the best IDE for C programming in Debian?

2008-08-01 Thread Chris Bannister
On Thu, Jul 31, 2008 at 10:21:40PM +0800, Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! Have a read of this: http://linuxgazette.net/152/srinivasan.html In the end its your

Re: what's the best IDE for C programming in Debian?

2008-08-01 Thread Anton Liaukevich
Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! I'm novice at Debian but I also want to express my opinion. I haven't still tried Visual Studion .NET 2008. When I began

Re: what's the best IDE for C programming in Debian?

2008-08-01 Thread Eugene V. Lyubimkin
Anton Liaukevich wrote: Finally, I heared of Code::Blocks IDE. It hasn't included in Debian (WHY???) but you can download .deb-package (for i386 amd64 architectures) from http://www.codeblocks.org/downloads/5. It is free open-source (GPL 3.0). It has been developed using wxWidgets 2.8

Re: what's the best IDE for C programming in Debian?

2008-08-01 Thread Thomas Preud'homme
Le vendredi 1 août 2008, Eugene V. Lyubimkin a écrit : Anton Liaukevich wrote: Finally, I heared of Code::Blocks IDE. It hasn't included in Debian (WHY???) but you can download .deb-package (for i386 amd64 architectures) from http://www.codeblocks.org/downloads/5. It is free open-source

Re: what's the best IDE for C programming in Debian?

2008-08-01 Thread Star Liu
On Fri, Aug 1, 2008 at 9:19 PM, Anton Liaukevich [EMAIL PROTECTED] wrote: Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! I'm novice at Debian but I also want to express my

what's the best IDE for C programming in Debian?

2008-07-31 Thread Star Liu
When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Steve Witt
On Thu, 31 Jul 2008, Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! emacs -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Thomas Preud'homme
Le jeudi 31 juillet 2008, Steve Witt a écrit : On Thu, 31 Jul 2008, Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! emacs The troll begins -- Thomas Preud'homme Why

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Eugene V. Lyubimkin
Steve Witt wrote: On Thu, 31 Jul 2008, Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! emacs or vim -- Eugene V. Lyubimkin aka JackYF signature.asc Description

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Sam Kuper
emacs or vim Here we go...

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Thomas Preud'homme
Le jeudi 31 juillet 2008, Thomas Preud'homme a écrit : Le jeudi 31 juillet 2008, Steve Witt a écrit : On Thu, 31 Jul 2008, Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Steve Witt
On Thu, 31 Jul 2008, Thomas Preud'homme wrote: Le jeudi 31 juillet 2008, Steve Witt a écrit : On Thu, 31 Jul 2008, Star Liu wrote: When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian, what's the best the IDE for C programming? thanks! emacs

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Sam Kuper
2008/7/31 Steve Witt [EMAIL PROTECTED] Seriously, if you like an big IDE then I'd recommend eclipse. I've been forced to use it on a project for the last year and I really dislike it. It is too heavyweight and gets in my way. To me, a decent editor that does syntax high-lighting (vim or emacs

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Kumar Appaiah
On Thu, Jul 31, 2008 at 9:10 PM, Steve Witt wrote: Seriously, if you like an big IDE then I'd recommend eclipse. I've been forced to use it on a project for the last year and I really dislike it. It is too heavyweight and gets in my way. To me, a decent editor that does syntax high-lighting

RE: what's the best IDE for C programming in Debian?

2008-07-31 Thread Stackpole, Chris
-Original Message- From: Star Liu [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 9:22 AM To: Debian User List Subject: what's the best IDE for C programming in Debian? When I develop in windows, I use visual studio.net 2008 as my IDE, if I want to develop in Debian

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Nuno Magalhães
I'd go with Chris: small stuff, use some text editor and gcc; medium projects, a text editor with syntax highlight and gcc; large projects.. Er... well either Eclipse or Netbeans, although i'm kind of allergic to java-based stuff. Emacs and vi(m) suck!! Eheh :) -- Nuno Magalhães

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Thomas Preud'homme
Le jeudi 31 juillet 2008, Stackpole, Chris a écrit : [SNIP] For medium projects I use Gedit. It will probably be listed in the menu as Text Editor. Now let me clarify that by default, it isn't worth much as anything but a simple text editor with tabs. However, install the gedit-plugins and

Re: what's the best IDE for C programming in Debian?

2008-07-31 Thread Dave Sherohman
On Thu, Jul 31, 2008 at 08:40:56AM -0700, Steve Witt wrote: Seriously, if you like an big IDE then I'd recommend eclipse. I've been forced to use it on a project for the last year and I really dislike it. A glowing recommendation, indeed. To me, a decent editor that does syntax

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

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 handles

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 look

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 over

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

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

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: 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. I'm

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 at the problem. No

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

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

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::vectorscan 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-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 there's some tricky

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 just seems (to an old C

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: C++ programming: keeping count of data items read from file [OT] [OOT] (off-off-topic)

2008-05-08 Thread s. keeling
Mark Allums [EMAIL PROTECTED]: Mark Allums wrote: Rich Healey wrote: Mark Allums wrote: 1. You might want to learn PERL or Python or Ruby, and do it there. FWIW, this is very easy to do in Python. PSFWIW: Satan uses Ruby. I thought that Beelzebub used IronPython.

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 operator

C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Hello, 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. The data file is just a text file with N lines with C doubles in each line (N and C are known a priori). For now, I just

Re: 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 11:42, H.S. wrote: Hello, 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. The data file is just a text file with N

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

2008-05-06 Thread H.S.
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/06/08 11:42, H.S. wrote: Hello, 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. The data file is just a

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

2008-05-06 Thread Robert Baron
On Tue, May 6, 2008 at 12:57 PM, Ron Johnson [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/06/08 11:42, H.S. wrote: Hello, 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: 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: 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. It's C++. Don't use C arrays, ugh.

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: 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 of data

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

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 while

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 items is not

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

2008-05-06 Thread Mark Allums
H.S. wrote: Hello, 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. The data file is just a text file with N lines with C doubles in each line (N and C are known a priori). For

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

Re: 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: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/06/08 11:42, H.S. wrote: Hello, 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

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 is not a

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: C++ programming: keeping count of data items read from file

2008-05-06 Thread H.S.
Mark Allums wrote: Not directly helpful, but some suggestions: 1. You might want to learn PERL or Python or Ruby, and do it there. hmm .. not sure how this will pan out in the long run, but for now, I am trying to keep it all within one program. 2. If it has to be C++, learn enough PERL

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

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

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 where he lives his

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::vectorscan l) { //read in scuba core list std::ifstream input(s.c_str()); std::string temp, pos, x ,y; char * t;

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 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::vectorscan 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 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 some

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

  1   2   3   >