Solved

also overloading methods!

Posted on 2002-04-17
3
164 Views
Last Modified: 2010-03-31
which one of the following is wrong and why
 
class student
{
public student(){}

public student (int a){}
public student (int b) {}
public student (in a,int b){}
public student (double a){}
public student (double a,double b){}

}

0
Comment
Question by:ms_lost
3 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 20 total points
ID: 6947354
public student (int a){}
public student (int b) {}

you can't have 2 methods (constructors) with same names and same types of parameters
0
 

Expert Comment

by:reynoldg
ID: 6947461
Venci75 is Right
0
 

Author Comment

by:ms_lost
ID: 6948940
thanks alot
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now