Question about objects

D

Default User

R2D2 said:
Do you understand what C++ is? It's the C language, with a few
extensions bolted on like objects and polymorphism. So in any
malfunctioning code, the problem might be the C base code, or the C++
extension parts. So it's perfectly suitable to ask in comp.lang.c as
well as comp.lang.c++.

*plonk*



Brian
 
F

Flash Gordon

R2D2 wrote, On 29/08/07 23:17:
Do you understand what C++ is?

Lots of people here do. It is a language.
It's the C language, with a few
extensions bolted on like objects and polymorphism.

No, it is a different language. A number of things that are legal C are
illegal C++.
So in any
malfunctioning code, the problem might be the C base code, or the C++
extension parts.

No, because there is no "C base code" only C++ code when you are writing
C++.
So it's perfectly suitable to ask in comp.lang.c as
well as comp.lang.c++.

What makes you think the people in comp.lang.c++ don't know all of the
"C base code?"

No, it is not reasonable to ask in comp.lang.c about C++ code, and since
you know about comp.lang.c++ you have no good excuse for doing so.
On 29 Aug 2007 at 20:37, J. J. Farrell wrote:

<snip>

Don't top post. Your reply belongs under or interspersed with the
message you are replying to.

Oh, and don't bother to reply. *PLONK*.
 
P

pete

R2D2 said:
I posted to comp.lang.c in case people could see a problem with the
underlying C code - please dont remove this crosspost. Thanks.

OK.
Here's what's wrong with your program
from a C point of view:
There isn't any part of your program
that means anything in C.
 
O

Old Wolf

could someone please explain to me, why in the
following code the second approach does not work?

class Base {};
class Inherited : public Base{};
void foo(std::vector<Base> arg) {}

void main() {

Should be:
int main() {
std::vector<Inherited> v1;

// doesn't work
foo(v1);

There is no implicit conversion from vector<Inherited> to
vector<Base>.
 
C

CBFalconer

R2D2 wrote: *** and top-posted - fixed ***
I don't really follow this - could you give a fuller explanation?

It is not C. Please keep this out of c.l.c. F'ups set.

Please do not top-post. Your answer belongs after (or intermixed
with) the quoted material to which you reply, after snipping all
irrelevant material. I fixed this one. See the following links:

--
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/> (taming google)
<http://members.fortunecity.com/nnqweb/> (newusers)
 
C

CBFalconer

R2D2 wrote: *** and rudely top-posted - fixed ***
Do you understand what C++ is? It's the C language, with a few
extensions bolted on like objects and polymorphism. So in any
malfunctioning code, the problem might be the C base code, or the C++
extension parts. So it's perfectly suitable to ask in comp.lang.c as
well as comp.lang.c++.

No it isn't. It has its own standard, which conflicts with the C
standard in various places. It has a generally different
attitude. Please cease cluttering c.l.c with this c.l.c++
material. The languages are different.

Please do not top-post. Your answer belongs after (or intermixed
with) the quoted material to which you reply, after snipping all
irrelevant material. I fixed this one. See the following links:

--
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/> (taming google)
<http://members.fortunecity.com/nnqweb/> (newusers)
 
B

BobR

Why is it that you are asking people in this NG for something, but, when
they ask you for something (NOT to top-post), you throw mud in their face?

**plonk**

fool
 
P

Pete Becker

OK.
Here's what's wrong with your program
from a C point of view:
There isn't any part of your program
that means anything in C.

So why is this cross-posted to comp.lang.c++?
 
A

Al Balmer

Do you understand what C++ is?

Yes. However, apparently you don't. Whatever you imagine to be the "C
base code" is surely understood by the experts who contribute to
c.l.c++.

And please stop top-posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top