|
When does vtable create? Run time or compile time.
Plz reply in descreptive way.
|
|
|
|
|
pan_angel wrote: When does vtable create? Run time or compile time.
See this[^].
|
|
|
|
|
my question is .
Is there any difference between the terms
function prototype
and
funciton return type ???
|
|
|
|
|
my question is .
Is there any difference between the terms
function prototype
and
funciton return type ???
Yes, there is. The return type is a part of prototype. Besides, a prototype contains also the argument list of the function. Note that the name of the function is fictive [in C++].
Consider the following prototype;
RETURN_TYPE functionname(ARGUMENT_LIST);
Got?
--
=====
Arman
|
|
|
|
|
Arman Z. Sahakyan wrote: Note that the name of the function is fictive
Is this an Armenian word?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I thought it was an English word. Neither it is an Armenian. But we use this word, perheps influenced from Russian language. It means 'not important' or 'formal'.
--
=====
Arman
|
|
|
|
|
Arman Z. Sahakyan wrote: It means 'not important' or 'formal'.
Strange how it can mean both since "not important" and "formal" are contrasting.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The function prototype specifies the whole signature of the function,
i.e. the name of the function, its return value type, the types (and the order) of the its arguments.
Hence function return type is only a part of the function prototype.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
one more question
function signatures contains function return type , arguments and not the funciton name?
|
|
|
|
|
AFAIK the function name is part of the function signature.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
So what's the difference between function signature and function prototyping?
|
|
|
|
|
the prototype is all you need to know to use a function (its name, what it gets as a parameter, and its return type).
the signature is what permits to overload a function, that is, the prototype without the returning type...
|
|
|
|
|
AFAIK they are synonims, though function signature is (perhaps) a more conceptual, abstract term. On the other hand a function prototype has a more practical evidence, because you can find it inside header files.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Nothing. The terms are used interchangeably.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi, I've recently opened a vc6 MFC project into vs2005 and let it do the conversions. The code would compile fine. Next I added a class called AviFile(Creating Movie from HBitmap on Codeproject) to the project which I assume is just using win32 API. However when I try to compile, I get his error message.
1>AviFile.obj : error LNK2019: unresolved external symbol _AVIFileInit@0 referenced in function "public: __thiscall CAviFile::CAviFile(char const *,unsigned long,unsigned long)" (??0CAviFile@@QAE@PBDKK@Z)<br />
1>AviFile.obj : error LNK2019: unresolved external symbol _AVIFileExit@0 referenced in function "public: __thiscall CAviFile::~CAviFile(void)" (??1CAviFile@@QAE@XZ)<br />
1>AviFile.obj : error LNK2019: unresolved external symbol _AVIFileRelease@4 referenced in function "private: void __thiscall CAviFile::ReleaseMemory(void)" (?ReleaseMemory@CAviFile@@AAEXXZ)<br />
...etc<br />
I think there's something wrong with the linker settings, but I can't quite figure it out. I've googled for possible solutions, but still no luck.
Does anyone have an idea?
Thanks
|
|
|
|
|
the compiler probably doesn't find the related .lib file into which those symbols are defined...
|
|
|
|
|
|
specify the Vfw32.lib in the "object/library modules"( project settings->Link ) of your project settings.
|
|
|
|
|
The AviFile class doesn't use the Vfw32.lib library, but uses vfw.h.
I'm using Visual Studio 2005, so would "object/library modules" be the Additional Library Directories?
Thanks
|
|
|
|
|
bankai123 wrote: The AviFile class doesn't use the Vfw32.lib library, but uses vfw.h.
Vfw32.lib will be having the link information for that functions.
bankai123 wrote: I'm using Visual Studio 2005
I dont have VS2005 now. How ever it is not Additional Library Directories.
|
|
|
|
|
Hi,
you may included vfw.h so you didn't get compilation error.
you got link error, find the option for linking corresponding to your IDE,
VS2005 needs to add vfw32.lib to project-><name>property->configuation property->linker->Input->Additional Dependency field.
|
|
|
|
|
Thanks for that, that solution solved the linker problem.
Now I seem to get this error
LINK : fatal error LNK1104: cannot open file 'C:\Program.obj'
Is this a problem with my directory path I specified? Which was
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib
|
|
|
|
|
when you add vfw32.lib does the field already had other libs, if so
donot put commas in between only spaces or add it using IDE as seperate entry.
also for long path having spaces c:/program files use "c:/program files"
include it in quotes
Best Regards
|
|
|
|
|
Thanks for the help! I forgot the quotes, the directory path should be in Dos 8.3 format, am I correct? Oh well, thanks, all is working now.
-- modified at 7:58 Friday 1st June, 2007
|
|
|
|
|
bankai123 wrote: The AviFile class doesn't use the Vfw32.lib library, but uses vfw.h.
The header file only contains the class declaration. From where do you think the implementation of the methods comes from ? Bingo, from the library file .
In visual studio 2005, go into "Project Properties" -> "Linker" -> "Input" and specify the library in "Additional Dependencies".
|
|
|
|