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 oper
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 eating
In , 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 generally result in your pro
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)
http:
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:
http://lists.debi
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
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 b
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 part
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 arch
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 supp
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,
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 stor
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
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))
have been in C for at least 20 years; probably since the Early
> Days.
I checked. Union is described in the Ritchie, Johnson, Lesk, 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
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,
beaut
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 K&R.
--
John Hasler
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian
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
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
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;
>
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
> Tue, 13 Apr 2010 17:29:51 -0500 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 do this
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 throug
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.
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]
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
>
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
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 sa
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
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:
intel
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 edit
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 o
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'
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
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". Tro
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
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 interjec
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.
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, Gre
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
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?
>>
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 & o
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
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.
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.htm
hi,
I ve just found codeblocks, that your are looking for I think.
see
http://www.codeblocks.org/downloads
best regards
bela
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 high-li
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-plugin
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
> -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,
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
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
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?
thank
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, wha
> > emacs
> >
> or vim
>
Here we go...
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
-
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!
>
&g
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". T
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]
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
-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
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
-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
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
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
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
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.
-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
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
-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
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
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
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
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
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;
"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
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
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.
>
I mean, given the connection
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.
--
Mark Allums
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mark Allums wrote:
> 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
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
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
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
-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
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;
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
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
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
> >
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
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.
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 t
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]
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
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 k
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
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 n
-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
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
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
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
1 - 100 of 256 matches
Mail list logo