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!"; }
what is it the compileer you installled?
keil c????
if you be answer keil c then code you give is bad and not compiler
you code is c++ but compile is c
c not thinking about cout like this you be not good and give errror
Can someone answer my question in English please!
Exactly what has goto with C/C++ to do?
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?
Refer to the 'Using goto in C/C++' debate.
So many people dismiss the use of it through academic belief and immediately preclude it's potential advantages.
FYI, I was likening it to the attitude I received concerning C++ on 8051 based embedded systems.
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).
I haven't had the time for a detailed look at the map file, but the summary line from building a simple "Hello, world" example as shown indicates that the total CODE space usage is on the order of 2K...
A quick glance would be sufficient to spot the following line:
C:000000H C:000000H C:007FFFH 000438H CODE
Which shows the total code size to be 1080 bytes.
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...!
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!
I do not give a hoot about your post, the subject of this thread is NOT that printf works in C, which we all know, but C++ on the '51.
As usual you are commenting on what you would like me to have said, or what you imagine I have said, rather than what I actually have said. If you had the wit to read and understand my post you might be able to make some sort of sensible contribution.
I'm quite happy for you to criticise anything I write on this forum, but please don't keep muddying the waters by criticising things I haven't written. It wastes even more bandwidth than I already expend trying to get you to stick to the facts.
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?
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.
I'm a C++ programmer. I write programs in C++. If I am to write a program, then the optimum path will be in C++.
You probably want it to be the optimum path. But like most C++ programmers with poor C background you probably have no idea what a C++ application does to the system it runs on. My advice to you: Do not use C++ on an 8-bit micro as long as you do not exactly know what the result is going to be. You are now on an embedded system, so try to look at problems not only from the top level.
View all questions in Keil forum