Which C tool?

C

CBFalconer

jaysome said:
CBFalconer said:
Roland said:
... snip ...

That's understood. I just wanted to be sure that VS 2005 compiled
the program as C program, not as C++ program. Therefore I needed
program that was valid in C but not in C++.

#include <stdio.h>
int main(void) {
char class[24];
const char *new = "I am a C compiler";

strcpy(class, new);
puts(new);
return 0;
}

warning C4013: 'strcpy' undefined; assuming extern returning int

I think you need to include <string.h>. ... snip ...

You are correct.
 
N

Neil

Hi

I have a copy of Visual Studio 2005 and Borland Delphi but I'm at a
loss to find where I can start to code C applications, they all give me
options to work in C++ but as I am dealing with embedded systems and
PIC devices I can't use it.

Does anyone know if I can get Visual Studio, I think its better than
Borland, to work with C or failing that what is the best C programing
tool?

Thanks,

JB

To write C for a PIC you Need a cross-compiler
Hi-Tech C, CSS or microchipC
details at microchipC.com

For visual Studio .C files are treated as C.
Delphi is a different language.
 
J

jussij

Simon said:
Prototypes are encouraged for C code. You really should use int
main(void), and also include <stdio.h>, <stdlib.h> and <string.h> to
provide prototypes for the functions you call.

I think the poster was trying to show VS2005 was compiling the code
as C and not C++ (ie the code would not compile without errors if
the C++ compiler was in fact doing the compiling).

Jussi Jumppanen
Author: Zeus for Windows IDE - http://www.zeusedit.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top