Errors, please help!
Hello,
I am trying to program a simple C program!
Why do I get the following errors, please see the errors at the end of this
program.
=================Program
#include <stdio.h>
#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;
int w[] = {100,101,102,103,104,105,106,107,108,109}; //Write to file
int r[10]={100,101,102,103,104,105,106,107,108,109}; //Read from file
void main(void)
{
FILE *fp;
int x,s;
int Stop;
// Open file for writting
if((fp = fopen("Rougefile", "wb")) == NULL){
printf("Cannot open file. \n");
exit(1);
}
//Write to file
for(s=0;s<10;s++)
{
if(fwrite(&w[s],1,1, fp) != 1) {
printf("Write error occured. \n");
exit(1);
}
}
fclose(fp);
//Open file for reading
if((fp = fopen("Rougefile", "rb")) == NULL){
printf("Cannot open file. \n");
exit(1);
}
//Read from file
for(s=0;s<10;s++)
{
if(fwrite(&r[s],1,1, fp) != 1) {
printf("Write error occured. \n");
exit(1);
}
}
for(s=0;s<10;s++) {printf("Here is the file's data >", r[s]);}
}
=======================================
ERRORS ARE:
BMC_24_16 Command line warning D4028 : minimal rebuild failure, reverting to
normal build
BMC_24_16 fatal error C1033: cannot open program database
'c:\_dts_programming\c_programming\c\bitmap_convertor\bcm\bmc_24_16\debug\vc70.idb'
I think this has something to do with setting the correct path, but where?
All help appreciated!
--
Best regards
Robert