We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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!"; }
I'm a C++ programmer.
In that case, you should also know C, since it is a subset of C++.
And even if you don't know C - if you really are a programmer, you should be able to learn it in a few days. Otherwise, you're just someone who writes code.
If I am to write a program, then the optimum path will be in C++.
... and if you have a big enough hammer, every problem will look like a nail, right ?
A programmer should know that there is such a thing as "the right tool for the job", and be able to select the right tool and learn to use it.
Would you do web development in C++ (instead of php or perl) ? Would you program a DSP in C++ (even though the compiler doesn't know 60% of the instruction set and will therefore produce abysmally slow code) ? Would you program huge numeric simulations in C++ (instead of Fortran) ? Would you program an operating system in C++ (instead of a mix of C and assembly) ? Would you program a portable web application in C++ (instead of Java) ? Would you program a customizable game UI in C++ (instead of LUA) ?
C++ is not the right tool for the job "Write a program for an 8051".
I have produced at least 7 digits of C++ code lines, so I like to think of myself as a C++ programmer.
I would not try a C++ program on a '51, because I know enough of C++ and the '51 architecture to know that it would not be advantageous to me - or to a customer.
Exactly how much embedded programming have you done? Do you really have enough experience that you can afford to ignore unanimous comments pointing in a different direction?
Are you willing to post your customers contact information here - so we can get in contact with them when they need a new supplier of the product? Right now, you are not heading in a direction what will lead to a working product.
Being a consultant means that you have to spend a significant time listening. First listening to the customer requirements. Then listening if there are existing solutions that can result in short development times and a well working product. Then listening to the feedback of the end users, so that you can suggest how to improve the product.
Were you as "goood" at listening to the customer requirements as you are at listening to the suggestions you receive here?
Ok,
The general view from this forum is that C++ an the 8052 don't mix.
Well, why do Ceibo have a product to do what you have been saying is not suitable?
I assume that they do have customers for such a product otherwise they would be out of business - Right?
So either they are wrong or you are wrong.
I think it is the product to try. It's just that I think the cost is too much. Maybe I won,t be able to afford such a big turkey this year ;)
Because there is a demeand from 'customers' that do not know better
Based on your posts I am confident that you have no idea of the '51 architecture (VERY fastidious statement: real programmers do not care about such details) so, to you, the '51 is "just another processor that you do not need to know".
This has nothing to do with C++, but with "real programmers". I was asked to help on implementing code banking (allowing a '51 program to be more than 64 k) by a company that had hired "real programmers" who, of course, started out with a 'great' OS and multitasked even the simplest operations. I had a look and redid the whole shebang to working code that fit in 8k.
there is no universal language, there is no universal processor some companies make money from those that believe it is so. And eveidently that will happen again. Have fun till you see your mistake.
Erik
"Well, why do Ceibo have a product to do what you have been saying is not suitable?"
Why do people who never drive outside the city limits have 4x4s? Why do people fit spoilers to cars that cannot possible reach a sufficient speed for them to be of any advantage? etc, etc...
I think you'll find that Ceibo is the only C++ product for the 8051, whereas there are many C compilers (some not even full ANSI) for the 8051 - that fits very well with the general opinion that C++ is not generally suitable for 8051 products.
"I assume that they do have customers for such a product otherwise they would be out of business - Right?"
Not necessarily: the 8051 C++ is not their only product - maybe not even a major product for them.
"Maybe I won,t be able to afford such a big turkey this year"
Buy an 8051 C++ cross-compiler - you might find that you do have a big turkey...
;-)
"Ok,
The general view from this forum is that C++ an the 8052 don't mix."
Filip,
Their real statement is somewhat more basic than that, but may not quite have gotten through. When you're programming for an "embedded" processor, various assumptions that are easy-to-make and almost guaranteed to be "correct" in a desktop environment cease to make any sense. Imagine this situation: Someone could have an 8052 based system that has all of the following:
1. A large LED bar sign that can scroll text 2. A small LCD display 3. A serial port
All of these bits of hardware could be considered the "console" referred to by cout. Which one is appropriate? Further, what code should be generated to control one of them when you use "cout <<"? These are the kinds of things that have to be considered in an embedded project.
I will make a prediction: If you buy the Ceibo package, it will have no idea how to compile "cout <<" unless you customize some library or at least tell it in detail what type of display and controller chip are attached to your board and where.
-Jay Daniel