I'm working on some C code in Visual Studio 2005 on Win7 Pro x64. The code is correct; it compiles and runs on MinGW under Eclipse. However, using certain functions from the standard C libraries like stdio or stdlib causes the following lines to exhibit syntax errors when the code is built in VS2005. As an example:
#include<time.h>
#include<stdlib.h>
#include<stdio.h>
#include"someOtherHeader.h"
int main(void){
srand((unsigned int) time(NULL));
double start;
.
.
.
The following code doesn't matter. VS2005 says that there is a missing ';' before 'type'. Commenting out srand() fixes the problem. Oddly, when rand() is called later, there is no problem. I also noticed the behavior with exit() and fprint(). But not with malloc(). Thoughts?