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
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
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
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
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
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)
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
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
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
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
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
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
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
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)
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
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.
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
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.
> >
> >
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
>
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
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
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
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
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.
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
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
-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
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
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
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
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
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
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]
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
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
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]
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
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
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
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
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
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]
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
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:
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
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
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
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
d
q
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
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.
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
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
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
> "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
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");
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
> "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
> "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
> "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
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
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
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 ) {
>
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
#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
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
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
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
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...
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
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
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
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 - 100 of 172 matches
Mail list logo