Click here to Skip to main content
15,890,845 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Illegal Indirection Error - CertFindChainInStore Pin
mypicturefaded27-Aug-09 10:06
mypicturefaded27-Aug-09 10:06 
QuestionRe: Illegal Indirection Error - CertFindChainInStore Pin
David Crow27-Aug-09 10:40
David Crow27-Aug-09 10:40 
AnswerRe: Illegal Indirection Error - CertFindChainInStore Pin
mypicturefaded28-Aug-09 4:33
mypicturefaded28-Aug-09 4:33 
GeneralRe: Illegal Indirection Error - CertFindChainInStore Pin
Randor 28-Aug-09 5:07
professional Randor 28-Aug-09 5:07 
QuestionMaximize window Pin
zhenek9127-Aug-09 4:49
zhenek9127-Aug-09 4:49 
AnswerRe: Maximize window Pin
«_Superman_»27-Aug-09 16:40
professional«_Superman_»27-Aug-09 16:40 
AnswerRe: Maximize window Pin
ThatsAlok28-Aug-09 0:40
ThatsAlok28-Aug-09 0:40 
QuestionI have many errors but I don't know why? Pin
moh.hijjawi27-Aug-09 3:41
moh.hijjawi27-Aug-09 3:41 
Hi all,

I have many compilation errors in my solutions and the type of errors are very different.

I am developing an MFC dialog application with visual studio 2005 and the follwoing is one of my work and with eash file I am adding the errors generated with each file.



// ( RulesMatching.h )


#ifndef RULESMATCHING_HEADER_ID
#define RULESMATCHING_HEADER_ID


#include "PatternMatching.h"


class CRulesMatching
{
public:
CRulesMatching();
int MatchRule(CString,int);

CPatternMatching OPM2; // create object OPM2 from the class
}

#endif



// ( RulesMatching.cpp )

#include "stdafx.h"
#include "RulesMatching.h"
#include "afxdb.h"
#include "odbcinst.h"


CRulesMatching::CRulesMatching()
{

}

int CRulesMatching::MatchRule(CString Str, int Cnum)
{


CDatabase database4;
CString SqlRulePattern;

CString sDriver("MICROSOFT ACCESS DRIVER (*.mdb)");
CString sDsn;
CString ssDSN("ODBC;DRIVER={%s};DSN='';DBQ=%s");
CString sFile("d:\\works\\ReadDB\\ASU.mdb");

sDsn.Format(ssDSN, sDriver, sFile);

database4.Open(NULL,false,false,sDsn);

CRecordset recset2( &database4 );


SqlRulePattern= "SELECT * from Patterns where CNum="+Cnum ;


recset2.Open(CRecordset::forwardOnly,SqlRulePattern,CRecordset::readOnly);
int Result2;
CString RContextNum,RRuleNum,RPatternNum,RPatternValue,RPatternContent;
CString BestRContextNum,BestRRuleNum,BestRPatternNum;

while(!recset2.IsEOF())
{
recset2.GetFieldValue(_T("CNum"),RContextNum);
recset2.GetFieldValue(_T("RNum"),RRuleNum);
recset2.GetFieldValue(_T("PNum"),RPatternNum);
recset2.GetFieldValue(_T("PValue"),RPatternValue);
recset2.GetFieldValue(_T("PContent"),RPatternContent);

Result2 = OPM2.MatchPattern(Str,RPatternContent);
if (Result2==1)
{
BestRContextNum = RContextNum;
BestRRuleNum = RRuleNum;
BestRPatternNum = RPatternNum;
recset2.MoveNext();
}

else
{
recset2.MoveNext();
}

}// while() closing



int i = _ttoi(BestRRuleNum);

return i ;





}



WHEN I COMPILE THE PREVIOUS ( .cpp file ) I HAD THESE ERRORS:


sqltypes.h(21) : error C2143: syntax error : missing ';' before 'string'
sqltypes.h(21) : error C2059: syntax error : 'string'
sqltypes.h(21) : error C2143: syntax error : missing ';' before '{'
sqltypes.h(21) : error C2447: '{' : missing function header (old-style formal list?)
afxdb_.h(70) : error C2146: syntax error : missing ';' before identifier 'm_dwDataLength'
afxdb_.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
afxdb_.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sql.h(578) : error C2143: syntax error : missing ';' before '__stdcall'
sql.h(578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sql.h(578) : error C2065: 'SQLHENV' : undeclared identifier
sql.h(578) : error C2146: syntax error : missing ')' before identifier 'EnvironmentHandle'
sql.h(578) : warning C4229: anachronism used : modifiers on data are ignored
sql.h(578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sql.h(579) : error C2059: syntax error : ')'
sql.h(581) : error C2143: syntax error : missing ';' before '__stdcall'
sql.h(581) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sql.h(581) : error C2086: 'int SQLRETURN' : redefinition
sql.h(578) : see declaration of 'SQLRETURN'
sql.h(581) : error C2065: 'EnvironmentHandle' : undeclared identifier
warning C4229: anachronism used : modifiers on data are ignored
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sql.h(581) : fatal error C1903: unable to recover from previous error(s); stopping compilation

ACA - 19 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



AND WHEN I COMPILE THE WHOLE SOLUTION I HAVE THESE ERRORS:



error C2236: unexpected 'class' 'CUtteranceCleaning'. Did you forget a ';'?
c:\documents and settings\mohammad\desktop\aca\aca\utterancecleaning.h(5) : error C2143: syntax error : missing ';' before '{'
c:\documents and settings\mohammad\desktop\aca\aca\utterancecleaning.h(5) : error C2447: '{' : missing function header (old-style formal list?)
c:\documents and settings\mohammad\desktop\aca\aca\acadlg.h(31) : error C2146: syntax error : missing ';' before identifier 'OUC'
acadlg.h(31) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\acadlg.h(31) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
acadlg.cpp(169) : error C2065: 'OUC' : undeclared identifier
acadlg.cpp(169) : error C2228: left of '.CleanUtterance' must have class/struct/union
type is ''unknown-type''
Build log was saved at "file://c:\Documents and Settings\mohammad\Desktop\ACA\ACA\Debug\BuildLog.htm"
ACA - 8 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========




I am sorry for this long thread but I worked for two days to make the solution working and I can't and I checked every missing semicolon or bracket and there is no somthing missing..

Please anyone can help me let me know and I appreciate any type of helping.
AnswerRe: I have many errors but I don't know why? Pin
Code-o-mat27-Aug-09 3:44
Code-o-mat27-Aug-09 3:44 
GeneralRe: I have many errors but I don't know why? Pin
moh.hijjawi27-Aug-09 4:35
moh.hijjawi27-Aug-09 4:35 
AnswerRe: I have many errors but I don't know why? Pin
Luc Pattyn27-Aug-09 7:44
sitebuilderLuc Pattyn27-Aug-09 7:44 
GeneralRe: I have many errors but I don't know why? Pin
moh.hijjawi29-Aug-09 4:37
moh.hijjawi29-Aug-09 4:37 
Questionfix data in virtual listctrl Pin
yiyinkuang27-Aug-09 2:42
yiyinkuang27-Aug-09 2:42 
QuestionRe: fix data in virtual listctrl Pin
David Crow27-Aug-09 3:05
David Crow27-Aug-09 3:05 
AnswerRe: fix data in virtual listctrl Pin
yiyinkuang27-Aug-09 3:46
yiyinkuang27-Aug-09 3:46 
QuestionRe: fix data in virtual listctrl Pin
David Crow27-Aug-09 4:10
David Crow27-Aug-09 4:10 
AnswerRe: fix data in virtual listctrl Pin
yiyinkuang27-Aug-09 4:25
yiyinkuang27-Aug-09 4:25 
GeneralRe: fix data in virtual listctrl Pin
David Crow27-Aug-09 4:58
David Crow27-Aug-09 4:58 
AnswerRe: fix data in virtual listctrl Pin
Maximilien27-Aug-09 3:23
Maximilien27-Aug-09 3:23 
GeneralRe: fix data in virtual listctrl Pin
yiyinkuang27-Aug-09 4:01
yiyinkuang27-Aug-09 4:01 
QuestionHow to change background color of button on dialog box in mfc Pin
pinky888427-Aug-09 1:50
pinky888427-Aug-09 1:50 
AnswerRe: How to change background color of button on dialog box in mfc Pin
David Crow27-Aug-09 3:12
David Crow27-Aug-09 3:12 
AnswerRe: How to change background color of button on dialog box in mfc Pin
Hamid_RT27-Aug-09 4:53
Hamid_RT27-Aug-09 4:53 
QuestionReading metadata of files Pin
emmmatty127-Aug-09 0:54
emmmatty127-Aug-09 0:54 
AnswerRe: Reading metadata of files Pin
Stuart Dootson27-Aug-09 1:00
professionalStuart Dootson27-Aug-09 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.