This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bug in compiler

I,ve installed the Compiler and I can,t get even the simplest code to compile properely.

Anyone know where the fix for this bug is?

Or is it a limit of the demonstration version?

void main(void)
{ cout << "Hello world!";
}

Parents
  • "Just curious, but how is C more limited than C++?"

    C++ is (basically) a superset of C

    Embedded C++ is (basically) a subset of C++

    And Embedded C++ is (basically) a subset of C++

    So, expressed in terms of facilities:

    C < Embedded C++ < C++

    I said it is more limited purely because it is considered to be lower level, less abstract etc

    So it could be extended to the expression:

    Assembler < C < Embedded C++ < C++

    The extrapolation to "Russian is more limited than German" is clearly wrong.

    But everyone knows that Esperanto is superior to all others ;)

Reply
  • "Just curious, but how is C more limited than C++?"

    C++ is (basically) a superset of C

    Embedded C++ is (basically) a subset of C++

    And Embedded C++ is (basically) a subset of C++

    So, expressed in terms of facilities:

    C < Embedded C++ < C++

    I said it is more limited purely because it is considered to be lower level, less abstract etc

    So it could be extended to the expression:

    Assembler < C < Embedded C++ < C++

    The extrapolation to "Russian is more limited than German" is clearly wrong.

    But everyone knows that Esperanto is superior to all others ;)

Children
  • Just to correct my last post before I get abuse:

    "Just curious, but how is C more limited than C++?"

    C++ is (basically) a superset of C

    Embedded C++ is (basically) a subset of C++

    And Embedded C++ is (basically) a superset of C

    So, expressed in terms of facilities:

    C < Embedded C++ < C++

    I said it is more limited purely because it is considered to be lower level, less abstract etc

    So it could be extended to the expression:

    Assembler < C < Embedded C++ < C++

    The extrapolation to "Russian is more limited than German" is clearly wrong.

    But everyone knows that Esperanto is superior to all others ;)

  • You started this thread because you didn't understand that a C compiler cannot compile C++ source code - you even called this a "bug"

    The point in mentioning that Embedded C++ doesn't support everything in "full" C++ was just to save you making the same mistake if you try to compile "full" C++ source code with an Embedded C++ compiler.

  • I may have started the thread thinking there was a bug.

    Since then I've been reading manuals and scanning web sites.

    I've been busy and think I've learnt a lot in a short time.

    I now know more about the various programming languages and (contrary to the apparent wish of some posters to this thread) am now working on a project with confidence that it will do what the contract requires.

    For example, I am already communicating with the display and showing text. Moreover, I am using classes.

    I hope that I will continue to learn and as a consequence I can then make and provide balanced opinions in the future.

  • So, what tool did you buy or are using the demo version of?

  • "I may have started the thread thinking there was a bug."

    You certainly did!
    And look how stubbornly and vehemently you attacked those who tried to explain to you why it is not a bug, but it perfectly normal and expected behaviour!

    "I now know more about the various programming languages"

    Good.
    Now that you understand, look back at your original dozen posts or so - look how you responded to the people who tried to explain this to you.
    Is it surprising that you got their backs up?

  • Is it surprising that you got their backs up?

    Hmmmm. I might have upset one or two. But WTF. That's life.

    More interesting than that is the evidence of bickering between respondents on this thread (and others).

  • So, what tool did you buy or are using the demo version of?

    At the moment I'm considering both the IAR and Ceibo options.

    Currently the limitations of the demonstration versions (of both) are sufficient high to allow me to do the basics.

  • "More interesting than that is the evidence of bickering between respondents on this thread"

    I think if you go to any forum and find any thread that tries to compare different products, languages, styles, or whatever you'll end up with some of that...!

  • I think if you go to any forum and find any thread that tries to compare different products, languages, styles, or whatever you'll end up with some of that...!

    You're probably right with that.

    But what I've witnessed, in the short time I've been here, is that there are one or two people on this forum who seem to go from thread to thread trying to win points over one another.

    I will mention no names. You will probably know who I'm talking about!

    And I got comments about my attitude!

  • Currently the limitations of the demonstration versions (of both) are sufficient high to allow me to do the basics.

    Which one generates the smallest code, and what processor are you building for?

  • C++ is NOT (basically) a superset of C
    Is was at one time. The different commities have caused both languges to diverge.
    Kind of like English and American English.

    Some identical expressions may work differently.

    How limiting Embedded C++ is compared to C++ you will have to find out. Since IAR has a trial version You are set. Let us know the outcome. It maybe of use to someone else.
    A post of how big cout << "Hello World" would be of intrest.

  • "C++ is NOT (basically) a superset of C"

    Might be closer to say that they share a common subset?

  • C++ is NOT (basically) a superset of C
    Is was at one time. The different commities have caused both languges to diverge.
    Kind of like English and American English.

    As was highlighted to me before on this thread 'if you know C++, then you also know C'.

    That view does appear to be a generally accepted one.

    I don't think I have ever seen the opposite of that mentioned; i.e., 'if you know C, then you know C++'.

    This REALLY does imply to me that C can (for most practical purposes) be viewed as a subset of C++.

    However, I do remember someone once trying to argue that because all pianos are made of wood, it must follow that all wood is made into pianos!

    The likening of C and C++ to English and American English you suggest are, I think, just plain stupid.

    Accents aside, it would be unusual for an American to not understand a Briton or a Briton to not understand an American.

    Give a C program to someone who knows C++ - They will probably be able to follow it.

    Give a C++ program to someone who knows C and no C++ - They may well be very confused with the classes, templates, operator overloading etc etc etc.

  • Give a C program to someone who knows C++ - They will probably be able to follow it.

    Filip,

    This statement is a common source of problems. There are numerous scenarios where this does not hold true. That is, an expression that is both valid C and C++ can have different meanings in each.

    For example, imagine you see the following declaration in a source file:

    extern int foo();
    

    Without looking at another source file, can you tell me what this declaration means? That answer, of course, is that it depends on what language we're talking about. In C, this is a declaration for an unprototyped function having external linkage that takes an unspecified number and type of parameters. This means that within this C module, the following:

    foo();
    foo(x);
    foo(3.14159);
    

    would all compile just fine. C++ on the other hand, would consider this function to have been defined as extern int foo(void) and would not compile any attempts to pass parameters to it.

    The statement that "C++ is not just a superset of C" is a way of saying that there are enough of these divergent paths taken in the languages that one should become fluent in each rather than saying "since I know C++, I also know C."

    -Jay Daniel


  • As was highlighted to me before on this thread 'if you know C++, then you also know C'.

    For the most part yes. But for the part that is not...
    A K&R Book would be handy

    That view does appear to be a generally accepted one.
    Like the world is flat?

    I don't think I have ever seen the opposite of that mentioned; i.e., 'if you know C, then you know C++'.
    I can not argue with you there.

    This REALLY does imply to me that C can (for most practical purposes) be viewed as a subset of C++.
    Only for the most part

    The likening of C and C++ to English and American English you suggest are, I think, just plain stupid.

    Accents aside, it would be unusual for an American to not understand a Briton or a Briton to not understand an American.
    I am not sure where you are from. But I as an American who went to England learn there is a little more of a difference then just the accent. They use words we do not. And some with a very different meaning like C / C++

    Give a C program to someone who knows C++ - They will probably be able to follow it.
    True

    Give a C++ program to someone who knows C and no C++ - They may well be very confused with the classes, templates, operator overloading etc etc etc.
    Very True