Good day,

i'm creating a calculator in c++ using visual c++. I got error's as below

c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(19) : error C2144: syntax error : '__w64 unsigned int' should be preceded by ';'
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(19) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 WINVER not defined. Defaulting to 0x0600 (Windows Vista)
c:\program files\microsoft sdks\windows\v6.0a\include\shlguid.h(11) : error C2144: syntax error : 'int' should be preceded by ';'
c:\program files\microsoft sdks\windows\v6.0a\include\shlguid.h(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\shlguid.h(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft sdks\windows\v6.0a\include\shlguid.h(11) : warning C4091: ' ' : ignored on left of 'const int' when no variable is declared
c:\program files\microsoft sdks\windows\v6.0a\include\shlguid.h(11) : error C2144: syntax error : 'GUID' should be preceded by ';'
c:\program files\microsoft sdks\windows\v6.0a\include\stdafx.h(36) : fatal error C1020: unexpected #endif

can any1 help me to solve this errors. thank u

Where is your source code?

Do you have any statements before you start #include'ing files?

Has it worked before, and now it's stopped working?

Which version of the compiler do you have, and which version of the SDK.

Thank you for your reply sir. I don't have any statement before the #include'ing' file and the i'm using microsoft visual studio 2008 and SDK platform is version 6.0. Is it the version of the SDK platform that we are using will effect our code..?

What about the other questions?

Has it worked before for similar projects on the same compiler/SDK?

Have you tried with a really "simple" project, ideally one which used to compile just fine?

Actually it runs when i run a coding that i take from the net but when i use the code with my data's in then it does not runs but i even tried to use the same code from the net but i copy and paste in different file but it still show the error.

thank u for ur reply sir but i hav found the solution for that code.

i have another error with my code... can u help me to solve this error

error C2664: 'strtod' : cannot convert parameter 1 from 'CString' to 'const char *'
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

..

i'm new to this forum, i don't know how to post the code here....
i need to solve this urgently... i will realy appreciate if anyone can help me to solve this by tomorrow....

#include<stdio.h>
#include<string.h>
void remplir(FILE *f)
{
char c;
char fichier[20];
printf("entrer les nom du fichier:");
scanf("%s",fichier);
f=fopen(fichier,"w");
if(f==NULL)
printf("erreur");
else
while((c=getchar())!='.')
{
//putc(c,f);
fprintf(f,"%c",c);
}
int comparer(FILE *f,FILE *fp)
{
char l1[10],l2[10];
printf("OOO");
while((!feof(f)) && (!feof(fp)))
{
fgets(l1,2,f);
fgets(l2,2,fp);
printf("OOO");
if(strcmp(l1,l2))
{
printf("%s",l1);
printf("%s",l2);
return 0;
}
}
if(!feof(f))
{fgets(l1,10,f);
printf("%s",l1);
return 0;
}
if(!feof(fp))
{fgets(l2,10,fp);
printf("%s",l2);
return 0;
}
return 1;
}
void main()
{int i;
FILE *f1,*fp1;

remplir(f1);


remplir(fp1);

i=comparer(f1,fp1);
if(i==0)printf("!=");
else printf("==");
}

Edited 5 Years Ago by fpm777: Iam not sure how to compare two files?

This article has been dead for over six months. Start a new discussion instead.