Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSid in report event function Pin
ashokvishnu25-Aug-06 0:54
ashokvishnu25-Aug-06 0:54 
QuestionC function for parsing string array? Pin
9ine25-Aug-06 0:38
9ine25-Aug-06 0:38 
AnswerRe: C function for parsing string array? Pin
Anonymuos25-Aug-06 0:52
Anonymuos25-Aug-06 0:52 
AnswerRe: C function for parsing string array? Pin
toxcct25-Aug-06 3:01
toxcct25-Aug-06 3:01 
GeneralRe: C function for parsing string array? Pin
Anonymuos25-Aug-06 6:03
Anonymuos25-Aug-06 6:03 
AnswerRe: C function for parsing string array? Pin
Zac Howland25-Aug-06 6:41
Zac Howland25-Aug-06 6:41 
AnswerRe: C function for parsing string array? [modified] Pin
Stephen Hewitt26-Aug-06 3:18
Stephen Hewitt26-Aug-06 3:18 
Questionbasic question in C++ Pin
Green Fuze25-Aug-06 0:37
Green Fuze25-Aug-06 0:37 
Hey everybody

I'm not sure if I'm asking in the right place, so if not, please let me know Smile | :) .

I'm a c# programmer and I user to program a LONG LONG LONG in c++ just a little little bit.
so I have a very basic question because the compiler is shouting at me and I really don't get why. Smile | :)

I wrote an Employee class (just for a little trainning)
and thats what I wrote (I'm using VS2005):

Employee.h :
class Employee<br />
{<br />
public:<br />
	int ID;<br />
	float wadge;<br />
	float hours;<br />
	float overtime;<br />
<br />
	Employee()<br />
	{<br />
		printf("initiallizing an Employee");<br />
	}<br />
<br />
	void show();<br />
<br />
private:<br />
<br />
	double calcSalary();<br />
}


and my Employee.cpp:
<br />
#include <stdio.h><br />
#include "Employee.h"<br />
<br />
double Employee::calcSalary()<br />
{<br />
	return (Employee::hours*Employee::wadge) + (Employee::overtime*Employee::wadge*1.5);<br />
}<br />
<br />
void Employee::show()<br />
{<br />
	printf("Employee's ID: ", Employee::ID);<br />
}


but for some reason I'm getting these compiling errors:
1. 'Employee' followed by 'double' is illegal (did you forget a ';'?)
Where did I wrote "Employee" and than "double"???

2. 'Employee Employee::calcSalary(void)' : overloaded function differs only by return type from 'double Employee::calcSalary(void)'
as far as I understand I did not defined any "Employee Employee::calcSalary(void)" function.

3. error C2371: 'Employee::calcSalary' : redefinition; different basic types
huh?! Smile | :)

as you can see, I'm pretty lost! Smile | :)

help anyone???

Thanks!
AnswerRe: basic question in C++ Pin
prasad_som25-Aug-06 1:54
prasad_som25-Aug-06 1:54 
GeneralRe: basic question in C++ Pin
Green Fuze25-Aug-06 2:10
Green Fuze25-Aug-06 2:10 
GeneralRe: basic question in C++ Pin
Kevin McFarlane27-Aug-06 8:32
Kevin McFarlane27-Aug-06 8:32 
AnswerRe: basic question in C++ Pin
Nish Nishant26-Aug-06 3:28
sitebuilderNish Nishant26-Aug-06 3:28 
QuestionProgress bar problem. Pin
Deepak Samuel24-Aug-06 23:51
Deepak Samuel24-Aug-06 23:51 
QuestionRe: Progress bar problem. Pin
Programm3r25-Aug-06 0:00
Programm3r25-Aug-06 0:00 
AnswerRe: Progress bar problem. Pin
Programm3r25-Aug-06 0:08
Programm3r25-Aug-06 0:08 
AnswerRe: Progress bar problem. Pin
Hamid_RT25-Aug-06 0:43
Hamid_RT25-Aug-06 0:43 
QuestionRe: Progress bar problem. Pin
David Crow25-Aug-06 2:40
David Crow25-Aug-06 2:40 
QuestionSuperscript and Subscript Calculation Pin
Identity Undisclosed24-Aug-06 23:12
Identity Undisclosed24-Aug-06 23:12 
Questionrefresh the device node for Deivce Manager Pin
jiajiah344524-Aug-06 22:42
jiajiah344524-Aug-06 22:42 
QuestionEthernet Programming Pin
Muhammad Azeem Azam24-Aug-06 22:36
Muhammad Azeem Azam24-Aug-06 22:36 
QuestionLength of SQL-query Pin
ensger24-Aug-06 22:27
ensger24-Aug-06 22:27 
AnswerRe: Length of SQL-query Pin
toxcct24-Aug-06 22:33
toxcct24-Aug-06 22:33 
GeneralRe: Length of SQL-query Pin
ensger25-Aug-06 0:29
ensger25-Aug-06 0:29 
QuestionBlogging with VC++ Pin
_AnsHUMAN_ 24-Aug-06 21:53
_AnsHUMAN_ 24-Aug-06 21:53 
AnswerRe: Blogging with VC++ Pin
Michael P Butler24-Aug-06 22:05
Michael P Butler24-Aug-06 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.