PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.cplus > About 30 chapters on C++ doubts
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
About 30 chapters on C++ doubts

Réponse
 
LinkBack Outils de la discussion
Vieux 09/06/2008, 14h14   #1
parag_paul@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut About 30 chapters on C++ doubts

http://concentratedlemonjuice.blogsp...n-my-blog.html

Try this one for 30 chapters on C++ doubts,
  Réponse avec citation
Vieux 09/06/2008, 19h55   #2
parag_paul@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: About 30 chapters on C++ doubts

On Jun 9, 6:14pm, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote:
> http://concentratedlemonjuice.blogsp...t-c-puzzles-on...
>
> Try this one for 30 chapters on C++ doubts,


Also added some genuine puzzles found on the way.
  Réponse avec citation
Vieux 09/06/2008, 20h28   #3
peter koch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: About 30 chapters on C++ doubts

On 9 Jun., 15:14, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote:
> http://concentratedlemonjuice.blogsp...t-c-puzzles-on...
>
> Try this one for 30 chapters on C++ doubts,


The first entry I took was item 20, which had item #93 as its first
item:

93. Why qsort is Still Useful in C++
C++ defines a set of generic algorithms such as sort and find.
However, the corresponding C algorithms, qsort and bsearch, are still
useful in C++ programs for at least three reasons:
• Legacy code. Familiarity with C algorithms is needed to maintain
legacy C code.
[you had that one right]

• Efficiency. You cannot apply STL algorithms to items that are not
stored in an STL container. [ wrong! ]
To apply these algorithms to a built-in array, you first have to copy
it into a container [ wrong! ]
--an operation that incurs runtime overhead.
• Applicability to non-OO data types. STL algorithms rely on operators
== and >.
[ wrong! ]
However, these operators are either meaningless or not defined when
applied to plain structs or built-in arrays. C algorithms do not rely
on these operators to work.

So for that one item you had three wrongs and one right.
I hope you remove those pages - a beginner might find them and believe
you.

/Peter
  Réponse avec citation
Vieux 09/06/2008, 20h34   #4
parag_paul@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: About 30 chapters on C++ doubts

On Jun 10, 12:28am, peter koch <peter.koch.lar...@gmail.com> wrote:
> On 9 Jun., 15:14, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
> wrote:
>
> >http://concentratedlemonjuice.blogsp...t-c-puzzles-on...

>
> > Try this one for 30 chapters on C++ doubts,

>
> The first entry I took was item 20, which had item #93 as its first
> item:
>
> 93. Why qsort is Still Useful in C++
> C++ defines a set of generic algorithms such as sort and find.
> However, the corresponding C algorithms, qsort and bsearch, are still
> useful in C++ programs for at least three reasons:
> • Legacy code. Familiarity with C algorithms is needed to maintain
> legacy C code.
> [you had that one right]
>
> • Efficiency. You cannot apply STL algorithms to items that are not
> stored in an STL container. [ wrong! ]
> To apply these algorithms to a built-in array, you first have to copy
> it into a container [ wrong! ]
> --an operation that incurs runtime overhead.
> • Applicability to non-OO data types. STL algorithms rely on operators
> == and >.
> [ wrong! ]
> However, these operators are either meaningless or not defined when
> applied to plain structs or built-in arrays. C algorithms do not rely
> on these operators to work.
>
> So for that one item you had three wrongs and one right.
> I hope you remove those pages - a beginner might find them and believe
> you.
>
> /Peter


I actually want to get them correct over time. This is not a paste and
forget attempt from me.
I will keep asking them individually over a period, start discussions
and get to the bottom of all of them.
This is an attempt to solve problems when a question and probable
asnswer is in hand. In the forums like this I typically come across a
visible network of though processes. Not everybody thinks same, no
geography or demography explains or demarks itself in their anwering
methods, but experts differ and they produce scenarios .
I really enjoy being able to get in touch with you, who make so much
difference to the answers I have

I appreciate it
-Parag
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h32.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12064 seconds with 12 queries