Rayne
2009-12-04 03:23:59 UTC
Hi all,
I'm trying to port code written by someone else from Linux to Windows,
and am having some trouble with the errors reported by the compiler.
I'm using Visual Studio .NET 2003.
I'm getting hundreds of error messages such as
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstdio(29) : error C2059: syntax error : ':'
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstdio(29) : error C2413: syntax error : missing '{' before ':'
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstring(17) : error C2059: syntax error : ':'
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstdio(17) : error C2413: syntax error : missing '{' before ':'
What could have caused these? I do have #include <stdio.h> and
<string.h>, and I don't have <iostream> or <iostream.h>.
Another problem I have is that one of the functions is declared as
follows:
BOOL function_name(int &a, int &b);
I get the "error C2059: syntax error: '&'" message. Is passing by
reference not allowed? Would changing this to a pointer (i.e. int *a,
int *b) be the correct way instead?
Thank you.
Regards,
Rayne
I'm trying to port code written by someone else from Linux to Windows,
and am having some trouble with the errors reported by the compiler.
I'm using Visual Studio .NET 2003.
I'm getting hundreds of error messages such as
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstdio(29) : error C2059: syntax error : ':'
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstdio(29) : error C2413: syntax error : missing '{' before ':'
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstring(17) : error C2059: syntax error : ':'
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include
\cstdio(17) : error C2413: syntax error : missing '{' before ':'
What could have caused these? I do have #include <stdio.h> and
<string.h>, and I don't have <iostream> or <iostream.h>.
Another problem I have is that one of the functions is declared as
follows:
BOOL function_name(int &a, int &b);
I get the "error C2059: syntax error: '&'" message. Is passing by
reference not allowed? Would changing this to a pointer (i.e. int *a,
int *b) be the correct way instead?
Thank you.
Regards,
Rayne