|
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".
|
|
|
|
|
Hi
can any one give me example program (or some thing idea) for
uploading and downloading a file in VC++, i am using MySQL as
an back end.
I can open (BROWSE) but can not select the exact path of file
and i am also unable for uploading it to database.
If any body can...Please help me
Regard's
Kaushik
|
|
|
|
|
|
Y_Kaushik wrote: downloading a file in VC++,
See URLDownloadToFile function.
|
|
|
|
|
Y_Kaushik wrote: can any one give me example program (or some thing idea) for
uploading and downloading a file in VC++...
From/to where?
"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 add a button on a dialog form. When the butter is on focus,I pressed the "Enter Key", the click event will be invoked. But if I set button's style "Owner draw", the click event will not be invoked when I pressed "Enter".
Could anyone give me the answer. Why?
Not only button, edit and some other controls seem very strange.
|
|
|
|
|
The Enter key will be sent to your button only if your button return DLGC_DEFPUSHBUTTON as response to the WM_GETDLGCODE message. When the owner style is set, this value will not be returned by the button. So the solution is to overide th WM_GETDLGCODE message of the button and return the DLGC_DEFPUSHBUTTON in addition to the default values.
like
return CButton::OnGetDlgCode()|DLGC_DEFPUSHBUTTON ;
|
|
|
|
|
But if I return DLGC_DEFPUSHBUTTON, I can not owner draw its background. Do you have any other better way to handle it.
Thanks a lot.
|
|
|
|
|
ok ok i missed one point. In addition to the above thing handle the BN_SETSTYLE message( you have to manully add it message map. Class wizrad will not show this message ).
in the mesasge map
ON_MESSAGE( BM_SETSTYLE, OnSetStyle )
The function
LRESULT ButtonEx::OnSetStyle( WPARAM wParam_i, LPARAM lParam_i )<br />
{<br />
const int ODDBTN_BS_TYPEMASK = 0x0000000FL;<br />
return DefWindowProc( BM_SETSTYLE, ( wParam_i & ~ODDBTN_BS_TYPEMASK ) | BS_OWNERDRAW, lParam_i );<br />
}
|
|
|
|
|
Ok. Now it works. But I feel a little wonder, what you need to write:
( wParam_i & ~ODDBTN_BS_TYPEMASK ) | BS_OWNERDRAW
why not
BS_OWNERDRAW
or
wParam_i | BS_OWNERDRAW
I still doesn't very clear how to handle edit control's ENTER event.When I set edit's style "multiline", it will accept ENTER event and do the parent Dialog's OnOK() function. But I only want it jump to the next tabstop control or find some function that I can handle the ENTER event.
Thanks for reply.
-- modified at 4:46 Monday 4th June, 2007
|
|
|
|