|
Thanks for your reply.
I have included definitions.h in disassembler.hpp so that source of this error can be in definitions.h. In my past experiences precompiler directives can be source of errors like this. Especially included files. Some times I had extra ';' token at the end of a header file and I got errors similar to this error in file that included the header file.
I thought that maybe I have error in definitions.h.
I gonna be crazy. What the heck is this error ?!? It's so simple statement.
-- modified at 4:25 Thursday 15th December, 2005
|
|
|
|
|
What is that #include doing in begining of definitions.h?I dont know much about programing but i think you should include something, like file?Could that be problem?![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Sorry I think there is a copy/paste problem. that line should be #include <stdio.h> I'm gone fix the post.
Thans a lot for your reply...
|
|
|
|
|
|
You could run the code through the preprocessor (only) and examine the output.
That's one way...
|
|
|
|
|
How can I do it ?
Thanks for your reply.
|
|
|
|
|
|
thans a lot. I'll try it.
|
|
|
|
|
Good luck.
The output from the preprocessor isn't very good looking, but it's what the compiler gets.
Kakan
|
|
|
|
|
I think you are getting these error messages because you are including a C++ header file and a class in a .C file. The file which is including the .HPP file must be a .CPP file.
this is this.
|
|
|
|
|
It worked !
I have included this file in main.c.
Now I renamed it to main.cpp and compiled the solution. It works.
Thanks a lot for your help.
|
|
|
|
|
Ametal wrote: Compiling...
main.c
Should this be main.cpp instead?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I want to change the name of my application to appear at the top of my screen.
I am using a menu which call many Views, one at time.
When i open the program, the New name appear and when a shift to another view, the new name disapear.
Where can I fix it so that it cann't change
I learn my self
|
|
|
|
|
|
Your Are right,
I try it, it's work well
Thanks for all
Best new year for you and your familly
|
|
|
|
|
Hi,
I create template class, declared in .h file and implemented in .cpp file. But it do not compile the functions in the .cpp file.
But when I put them in the .h file, it's OK.
The .cpp file is in the source files list.
I use VC 6.
Thank you.
- NS -
|
|
|
|
|
Is it possible to send the errors or the files ?
I think that you got linker error when you had tried to compile.
|
|
|
|
|
Yes. Linker error for only those functions used.
- NS -
|
|
|
|
|
|
Link error:
TemplateClass.obj : error LNK2001: unresolved external symbol "protected: struct DataList<int>::NODE_t * __thiscall DataList<int>::DetachNode(unsigned int)" (?DetachNode@?$DataList@H@@IAEPAUNODE_t@1@I@Z)
Debug/TemplateClass.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
But this function is in the .cpp file.
It is...
template < typename T >
DataList < T > ::NODE_t* DataList < T > ::DetachNode( UINT uIndex_i )
{
// some codes
}
If I put this function in .h file, it works fine.
<B>- NS -</B>
|
|
|
|
|
Delete all your debug or release directory.
Make sure you have exacly the the same function definition in cpp and h file.
And don't include cpp file in header file
Recompile file.
|
|
|
|
|
I did it. But no change.
- NS -
|
|
|
|
|
|
template is to class as class is to object.
a class isn't an object, it is used to create objects.
a template isn't a class, it is used to create classes.
as a template isn't a class it isn't code.
when you declare an instance of a template the compiler generates the appropriate code for the class - that's what will get compiled.
...cmk
Save the whales - collect the whole set
-- modified at 23:20 Thursday 15th December, 2005
|
|
|
|
|
I am working on writing a MFC application supporting both container and server of compound document. Because i use a third part y ole client in my application, and meanwhile I also want insert my object into word.
However, I find Microsoft word does not work well with a nested compound document(for example insert a wordpad object into word, and then insert microsoft paint into wordpad). There are error message of "unable to update client".
However, Microsoft Excel/Power Point work well with a nested compound document .
Does anyone can help me in this regard?
|
|
|
|