Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a Function

Status
Not open for further replies.

Monalisa

Programmer
Jun 25, 2000
6
NP
I'm reading a book on using VC++, the book say;<br><br>step 3: Specify the function type as void, the function declaration as FillFontList,<br>and the access as Private. Click the OK button to close the dialog and *add the function*.<br><br>void CDay7Dlg::FillFontList()<br>{<br> some codes follows here<br>}<br><br> As the book say *add the function* how do I add the function.<br> <br>Thanks in advance!
 
Hi,<br>You have to select the class view. Then click the right mouse button on the class for which you want to add&nbsp;&nbsp;a function. Hope it will work.<br>Zulfi.
 
<br> I opened Class View but there are no enrties as FillFontList. In order<br>to add function first I have to choose FullFontList and click add function.<br>But if there are not any such thing as FullFontList then how do I add function.<br> <br> If I edit the code and compile it. It returns this error message;<br>c:\msvs\myprojects\day7\day7dlg.h(54) : error C2182: 'FillFontList' : illegal use of type 'void'<br> <br> Thanks!
 
Dear Monalisa,<br><br>In your example function signature:<br><br>&gt; void CDay7Dlg::FillFontList()<br><br>'CDay7Dlg' is the class name<br>'FillFontList' is the function name<br><br>Therefore you would find CDay7Dlg in the class view and right click on it. In the 'Add member function' dialog you would put FillFontList in the 'Function Declaration'.<br><br>Good luck<br>-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top