C programming problem

ErnieM

Joined Apr 24, 2011
8,377
The 4th from the right button above the edit box where you type your query is for INSERT, and the 3rd choice diown says "Code"

Find and click that menu item and it makes a window you can type (or paste) your code into. It is very free with formatting leaving tabs and spaces alone so code can still be read.

Or you can add the tags directly as I typed, except I inserted spaces so they would not work as tags and you can see them.

If you typed your code as it appears we need to give you a style lesson. <g>

This was done inside tags:
Code:
This is inside code tags.
 
      wheeee
 

tshuck

Joined Oct 18, 2012
3,534
What's the *.c file? @ tshuck

ErnieM can u pls give me an example of what u mean by '
Code:
tags'
The file you are editing uses the C programming language, as such, the file has ".c" as its extension. By saying *.c, in referencing whatever file (that is relevant) has the ".c."extension.

This file must be added to your project.
 

takao21203

Joined Apr 28, 2012
3,702
MPLABX isnt so bad, you can create the frame work with a template, and it will be in working order.
All added, compiles, executes + does nothing.

you can actually add foreign compilers too, so instead of the Microchip XC8, the IDE will use the one you specify, you can choose on project per project basis.
 

JohnInTX

Joined Jun 26, 2012
4,787
Is this still MicroC?

The reason I ask is that pasting your last code and trying to compile it in MicroC gets lots of errors - like unknown directives. The #fuses directive is unknown to MicroC and a search of the manual comes up blank.
If you are still using MicroC, where are you getting this code??

Confused. But thanks to tshuck for pointing out the project-oriented stuff. Didn't know that.
 

Thread Starter

Prinz

Joined Nov 16, 2014
16
I get lots of errors too, aside d main function error, I also get directives error, is it possible to debug and correct thje code?
 

Thread Starter

Prinz

Joined Nov 16, 2014
16
I get lots of errors too, aside d main function error, I also get directives error, is it possible to debug and correct thje code?
 

shteii01

Joined Feb 19, 2010
4,644
I get lots of errors too, aside d main function error, I also get directives error, is it possible to debug and correct thje code?
Anything is possible. (But some things are highly unlikely.)
The fact that you don't know C syntax and don't even know how to call a function or use a function is not encoraging.

Normal people use line numbers from the error messages to figure out where the error occures. Since all we got from you: "I get a lot of errors", you will have to debug the code on your own.
 
Top