|
What is the difference b/w function overloading and function overriding??
|
|
|
|
|
Function overloading: it is when you have two function with the same name but different arguments in the same scope. For example:
void Func1(int, int);
void Func1(float, float);
Depending of the type of the arguments that will be supplied to the function, the corresponding one will be called.
Function overriding: it is when you have a base class that defines a function and this function is redefined in an inherited class. This is usefull for providing a different behavior between the base and the child class.
|
|
|
|
|
I have read that "C++ is employs type-safe linking to enable function overloading"
what is the meaning of type safe? and
what is the meaning of type safe according to this context?
plz guide me.
krishna
krishna
|
|
|
|
|
|
How to store and retrive the metafile information from file
|
|
|
|
|
What kind of metafile? Windows Metafile?
Please be more specific in your post.
|
|
|
|
|
Hello friends,
I have been asked to Find out the new manifest method of Visual Studio 2005 and implement the manifest in my project ,and test it on different themes.
any one please suggest me some references that could help me.
Thank u!!!
|
|
|
|
|
Hi guys,
I'm building a simple mail program, and I want to send mail to an address but I am having a few issues with the authentication.
I'll use telnet in my discussion because its easier but I'm doing this in VC++.
Basically the smtp server I am using is:
smtp.gmail.com port 587 (Yes i know its not 25, but google requires this for TLS). Here is what i input into telnet:
220 mx.gmail.com ESMTP e14sm234337qba
ehlo server
250-mx.gmail.com at your service
250-SIZE 20971520
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
starttls
220 2.0.0 Ready to start TLS
auth login
Connection to host lost.
You can see after I put in AUTH LOGIN, I get disconnected.
My question is, after i enter the command STARTTLS, how do i enter my login information and the corresponding mail commands (MAIL FROM:, RCPT TO: etc.)?
If I have to some how incorporate SSL into sending commands how would I do that using C++?
I looke allllll over google and other places but couldnt find an answer. Any help would be appreciated. Thanks guys!
Robbie
|
|
|
|
|
hi capricious_001
you can check http://www.codeproject.com/internet/csmtpconn.asp[^]
The Program is not through Telnet but it's a simple implementation to send mails using SMTP.
Hope it helps....
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Hey quickdeveloper,
Thats a really neat program, and I'm actually looking at using that. What I really like is that its REALLY clean and well documented... meaning it took me only a few seconds to realize whats going on and i'm a newbie programmer.
The only problem is that you need to have access to an SMTP server that has no authentication whatsoever and doesnt use SSL.
lol you wouldnt know of any SMTP Servers that don't have any authentication or use SSL would you? :P
Thanks for the script btw
Robbie
|
|
|
|
|
I debug a program with break points. I checked variable values all O.K.
Suddenly I got error message: Unhandled exception in Data.exe, OXC00000FD, Stack Overflow
WHat is the problem ? how to fix it?
|
|
|
|
|
Most likely you've got recursion that is too deep. i.e.
void Foo()
{
Foo();
}
Steve
|
|
|
|
|
Thanks Steve. It looks like I solved the problem by reduce the size of arrays in the program.
However, now I got "unhandled exception, 0xC0000005 access violation"
Please help thanks
|
|
|
|
|
Can you show the code in question?
Steve
|
|
|
|
|
When I print (using the break points)the array value, e.g. data[1022] I got -1.#INDO and the error message says: Unhandled exception in Data_proc.exe:0xC0000005: Access violation
The function code where the message is generated:
void CBlast_vib_procDlg::complexFFT(float data[],unsigned int &nn,int &isign)
-> {
The data[1022] is within the range of the array defination.
Thanks
|
|
|
|
|
First, I create a bmp control on a Dialog , and set its ID to ID_MYBMP
second, I creat a member variable for the bmp control as m_mybmp ;
third, I import a bmp file into the resource and name it IDB_MYBMP ;
forth, I add following code to the funcion OnInitDialog()
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CBitmap bmp;
bmp.LoadBitmap(IDB_MYBMP);
m_mybmp.SetBitmap((HBITMAP)bmp);
}
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
I'd check if bmp contains a bitmap, in the debugger. One way is just to call GetWidth and see what you get back. Then you can focus on the bitmap control as a possible source of the problem.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Try the following code as it works in my application for same
CBitmap bmp;
bmp.LoadBitmap(MAKEINTRESOURCE(IDB_SCHEDULE));
m_Schedule.SetBitmap(bmp);
bmp.Detach();
Hope it works for you
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
-- modified at 0:13 Wednesday 12th April, 2006
|
|
|
|
|
Hi ewighell
Do you set Bitmap(false) to true in property window from control?
|
|
|
|
|
The bitmap is destroyed when your CBitmap object goes out of scope. Make the CBitmap a member of your dialog class.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
I made it with your helps.
Thank you all very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
Hello,
I have a simple application where I try to display a dialog with a timer. It builds fine in the debug mode but not in the release mode. This is the error I get:
MainFrm.obj : error LNK2001: unresolved external symbol "protected: long __thiscall CMainFrame::OnNotifyPowerOnTime(unsigned int,long)" (?OnNotifyPowerOnTime@CMainFrame@@IAEJIJ@Z)
Release/NotifyTimer.exe : fatal error LNK1120: 1 unresolved externals
Relevant Code:
////////////////////////////////////////////////
// CMainFrame
#define WM_NOTIFY_POWER_ON_TIME (WM_USER + 1)
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
ON_WM_CREATE()
ON_MESSAGE(WM_NOTIFY_POWER_ON_TIME, OnNotifyPowerOnTime)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////
function definition
/////////////////////////////////
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg LRESULT OnNotifyPowerOnTime(WPARAM,LPARAM);
//////////////////////////////////
//////////////////the function///////////
LRESULT CMainFrame::OnNotifyPowerOnTime(WPARAM, LPARAM lParam)
{
...
...
return (LRESULT) 0;
}
Any suggestions? Help??
Thankyou
Murali
-- modified at 19:54 Tuesday 11th April, 2006
|
|
|
|
|
Make sure that the OnNotifyPowerOnTime function implementation is not enclosed within a #ifdef DEBUG section (there is one around the Dump( ) and AssertValid( ) functions, it may have ended up inside that section).
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Hi dabs,
You were right. The function was enclosed within a #ifdef _DEBUG section. I moved the function outside the #ifdef _DEBUG and recompiled and everything is fine. Thanks for your help.
Murali
|
|
|
|
|
LRESULT CMainFrame::OnNotifyPowerOnTime(WPARAM, LPARAM lParam)
{
...
...
return (LRESULT) 0;
}
where is the parameter of the wparam or is it ok...
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|