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.
Hello i am new to this programming software, so can anyone tell me whats wrong with this code?
#include<stdio.> void main() { printf("Hello World"); while(1); }
Should be:
#include <stdio.h>
yeah i know just mistyed it
Do you mean that you mistyped into the forum posting message box when you should have simply cut from the source and pasted into the box?
Or do you mean that the typo exists in the code that you've been trying to compile and that now that the typo is fixed that everything is just peachy?
If a problem still exists, you could try describing it.
No what i meant is that in my code i wrote #include<stdio.h> ... but i am still cant see any output!!
printf() outputs through putchar(). Do you have putchar() working properly?
What tools are you using? By that, I mean are you using the Keil tools for the 8051 or are you using the Keil tools for the 251, or are you using the Keil tools for the C16x, or are you using the Keil tools for ARM devices.
You see, the answer to your question depends a little bit on which tool chain you are using. The reason is that accessing the on-chip serial port is different for all of these toolchains. Furthermore, it may be different depending on the device you are using. So, knowing that in addition may help us help you.
One question I have is have you tried the "Hello World" examples that are provided, tested, and known to work?
Jon