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!
greenbirdAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
vbk_bgmConnect With a Mentor Commented:
I think you've chosen the Win32 console app option and added the files to the project.
In project settings, choose
In General Tab, Not Using MFC.
In C++ tab, In Category combobox --> choose Precompiled Headers->
Choose Not Using precompiled headers and
then delete any stdafx.h and stdafx.cpp
files.

If this doesn't work please post your code.
 
0
 
inprasCommented:
pl put the code here and what U have done to run it?
0
 
greenbirdAuthor Commented:
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!
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
NorbertCommented:
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.
 
0
 
greenbirdAuthor Commented:
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!
0
 
greenbirdAuthor Commented:
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.

0
 
NorbertCommented:
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.
0
 
greenbirdAuthor Commented:
Hi, all,

thanks for all the replies.

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

thanks anyway and have a nice day!
0
All Courses

From novice to tech pro — start learning today.