Author: Mark Boylan
Date: 19:33:17 03/07/06
Go up one level in this thread
On March 07, 2006 at 22:19:39, David B Weller wrote:
>That looks good, but ....
>
>Does VC 2005 express NOT work on c ? Because when trying to import my source
>into it, I get 455 errors which make no sense.
>
>eg.,
>
>int c;
>c = 0;
>
>undefined reference to c ??? [oh, ok, 'c' is a figment of my sick imagination]
>
>missing ';' before type [when there is no missing semi-colon within miles]
>
>Clearly, it is too late ... thanks Dann for all your help ... will take this up
>again in the morning ... good night
Are you trying to compile as C++ and not C? I think that VC++ makes that
assumption based on the file extension. I've never tried VC Express.
In any case
int c;
c = 0;
is valid C++ anywhere, but it is only valid in C at the beginning of a block.
in C++ you could do:
void func(void) {
int x;
x = 0;
int c;
c = 0;
}
but in C you'd have to rewite it something like this:
void func(void) {
int x;
int c;
x = 0;
c = 0;
}
to get it to compile.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.