Link to home
Start Free TrialLog in
Avatar of greenbird
greenbird

asked on

Very Strange! pls help!!!

Hi,
 i had a dos program which runs fine. now i want to incorporate it into my VC++(MFC) program. it gives me some error message:

 D:\sp\myexc\open_c45\open_c45_getdata.cpp(11) : error C2143: syntax error : missing ';' before '*'
 D:\sp\myexc\open_c45\open_c45_getdata.cpp(11) : error C2501: 'Continuous_Attribute' : missing storage-class or type specifiers
 D:\sp\myexc\open_c45\open_c45_getdata.cpp(11) : error C2501: 'm_attribute' : missing storage-class or type specifiers
 D:\sp\myexc\open_c45\open_c45_getdata.cpp(12) : error C2143: syntax error : missing ';' before '*'
 D:\sp\myexc\open_c45\open_c45_getdata.cpp(12) : error C2501: 'Class_info' : missing storage-class or type specifiers
 D:\sp\myexc\open_c45\open_c45_getdata.cpp(12) : error C2501: 'm_Class' : missing storage-class or type specifiers
 Error executing cl.exe.



 i find that there is no declaration for "Continuous_Attribute" and "Class_Info" in all the header files. but why it can work in dos? (it is only an application, no interface).
 but can not in window?

 pls help! thanks a lot!
Avatar of inpras
inpras

pl put the code here and what U have done to run it?
ASKER CERTIFIED SOLUTION
Avatar of vbk_bgm
vbk_bgm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of greenbird

ASKER

Hi,

first thanks for all the replies.
well let met state my qns clearer:

i have a dos program :open_C45 (it is console application) it runs well. now i wnat to create MFC Appwizard(exe) project which incorporate the files in. that is in the dialog based application there is a run button, after i click it, it is supposed to use the functions in the console application, eg change main(..) to tree_main(..) to pass parameters to it directly.

but now i got the errors mentioned above. actually i can not find the "Continuous_Attribute" and "Class_Info" declarations. (they are not declared, strange). but why they can run in dos, but not in window??

vbk i try to change the setting, but there is no "Not using MFC" since my application now is MFC application.
so what is the problem?

if u wnat to look at the code, ( coz it is too large to post here), pls send me ur email address at:

aibinbin@hotmail.com

thank u veyr much for ur kind help!!! hope can resolve it soon as the due date is coming...

thanks!
most time such errors occures because of a undefined type
//#include "Mytype.h"
MyType* pMyType;
may produce this error and
#include "Mytype.h"
MyType* pMyType;
is fine (expecting definition of MyType is inside MyType.h)
check what is before the '*' in line 11 and is it well defined for the compiler at that line.
without source code I am not able to interpret the error message but
I think we don't need the complete code.
the error message points to line 11
D:\sp\myexc\open_c45\open_c45_getdata.cpp(11) : error C2143: syntax error : missing ';' before '*'
near that line (line 11) it is missing something so it would be nice at first
to show us line 1 until 15
and that is not to much.
but seeing this code may be we can tell you more.
 
Hi,

well what Norbert mentioned is not the cause of the error. i had checked all the files, the headerfiles are all there (include "stdafx.h").

the strange thing is that they are not declared at all in any of the files. but it can run in console application(dos), but not for window application(MFC).

really can not finger out the problem, any one has any idea? if u want to look at the code, pls send me an email at aibinbin@hotmail.com.

thanks for ur help!
one more point, i think
D:\sp\myexc\open_c45\open_c45_getdata.cpp(11) : error C2143: syntax error : missing ';' before '*'

this error is caused by  
Continuous_Attribute' : missing storage-class or type specifiers

coz it is not declared, so it can not find it and gives the error.

are the headerfiles included to open_c45_getdata.cpp ?

Perhaps my english is not good enough to understand what you want to say but what do you mean by

>>>the strange thing is that they are not declared at all in any of the files. but it can run in console application(dos), but not for window application(MFC)<<<
do you want to say that you are able to build a console app but you are not able to build a mfc app ?

About the code:
I have not time to have a look at your complete code
but because you are able to cut and paste peeces of code it should be possible to show the relevant code

may be you don't want to offer your code to the whole world but may be you understand that I also don't want to give my email adress to everyone.
That is nothing against you it is a pricipal thing.
Hi, all,

thanks for all the replies.

i had solved this qn, it is my fault :)

thanks anyway and have a nice day!