Help with first vc++ program

Hi guys,

I am trying to build a basic calculator using vc++. yesterday night I just finished the 'skin' of the calculator(buttons and everything).
Today, I opened it and tried to execute the calc.cpp and the calcdlg.cpp, the calcdlg.cpp is giving errors.

The errors are -
_____________________________________________
compiling...
calcDlg.cpp
E:\Microsoft Visual Studio\MyProjects\calc\calcDlg.cpp(175) : error C2039: 'On' : is not a member of 'CCalcDlg'
e:\microsoft visual studio\myprojects\calc\calcdlg.h(14) : see declaration of 'CCalcDlg'
E:\Microsoft Visual Studio\MyProjects\calc\calcDlg.cpp(176) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
Error executing cl.exe.

calcDlg.exe - 2 error(s), 0 warning(s)

___________________________________________

I am a VC++ newbie. But i do know c++.

One more question, I do all my coding in calc.cpp, right?
Thanks in advance guys.
[1079 byte] By [hithesh123] at [2007-11-19 7:25:42]
# 1 Re: Help with first vc++ program
The first error is obvious. On line 175 you seem to have a function called On() that isn't declared properly in the header. For the next line I can't recognize or reproduce the error message. You can post those two lines to make it more clear.

About where most of your code will go - probably in calcDlg.cpp/.h if this is a dialog based app named calc. Good luck.

Jay
Jay Tautges at 2007-11-11 0:27:28 >
# 2 Re: Help with first vc++ program
Jay, thanks a lot. I was fiddling with the code and compiled it. I got 26 errors.
I just redid it and now theres only one error.
Here it is -
_________________________________________
Compiling...
calcDlg.cpp
e:\microsoft visual studio\myprojects\calc\calcdlg.cpp(4) : fatal error C1083: Cannot open precompiled header file: 'Debug/calc.pch': No such file or directory
Error executing cl.exe.

calcDlg.obj - 1 error(s), 0 warning(s)
----------------------

Line 4 in the code is - #include "stdafx.h"
Any ideas, guys?

Thanks in advance.
hithesh123 at 2007-11-11 0:28:31 >
# 3 Re: Help with first vc++ program
If you did a search, you would have had two pages worth of hits:

http://www.dev-archive.com/forum/search.php?searchid=624597

Regards,

Paul McKenzie
Paul McKenzie at 2007-11-11 0:29:30 >
# 4 Re: Help with first vc++ program
Paul, the link is not workin.
hithesh123 at 2007-11-11 0:30:37 >
# 5 Re: Help with first vc++ program
Please use the search function. "C1083: Cannot open precompiled header file"
There you will find the solution.
blueday54555 at 2007-11-11 0:31:36 >