Please correct the errors with replacement lines

Assignment Help C/C++ Programming
Reference no: EM13938609

Please correct the errors with replacement lines beside it. And then give short notes on why it is wrong.

The code is attached.

1) Please correct the errors with replacement lines beside it. And then give short notes on why it is wrong.

class Person
{
private:
char name[30];
int age;

public:
Person (string, int);
int setage (int);
int setname (char *);
void show (void);

};

void main()
{
Person a_group [5];
int i;

for (i=0; i<6; i++)
a_group[i].setage(i+1);

for (i=0;i<6;i++)
cout << "Person " << i+1 << " is " << a_group[i].age << end1;
}

2) Please correct the errors with replacement lines beside it. And then give short notes on why it is wrong if the below codes replace the codes between the two === in 1):

void main (void)
{
Person a_person;
a_person.age = 99;
}

Reference no: EM13938609

Questions Cloud

Mobile device security : Suggest three (3) benefits that organizations can gain from deploying a Mobile Device Management (MDM) security solution. Additionally, suppose that an organization chose not to deploy an MDM solution. Determine what you believe to be the major risks..
What did dennis stevens mean by a silent deal : Name and then describe the theory that Laub and Sampson developed. What did Dennis Stevens mean by a "silent deal"? What is "bulletproof software" and who developed it? Discuss Thornberry's views on delinquency
What is the weighted cost of capital for el suezo : Weighted Average Cost of Capital and Economic Value Added El Suezo Inc. What is the weighted cost of capital for El Suezo? Calculate EVA for El Suezo.
Theory of creep and viscoplasticity : Principles associated with the theory of Creep and Viscoplasticity need to be identified and your understanding of these principles. Graphs, tables, calculation etc should be included for better illustration.
Please correct the errors with replacement lines : Please correct the errors with replacement lines beside it. And then give short notes on why it is wrong.
Which symbol would be used in a flowchart : Which symbol would be used in a flowchart for the following statement?Read customerName
What is the meaning of negative residual income or eva : What is residual income? What is EVA? How does EVA differ from the general definition of residual income? Can residual income or EVA ever be negative? What is the meaning of negative residual income or EVA?
Describe the nature of decalcified bone : Two common blisters of the integument are watery blisters, filled with a clean fluid, and blood blisters, filled with blood. Based on your knowledge of the blood supply to the integument, describe what layer might be damaged in the these two blist..
Complete the anatomy of my computer table : Complete the Anatomy of My Computer table below. In order to gather the information you can look at your computer's documentation or go to the manufacturer's website and search for your computer. Include your findings in the cell to the right of the ..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd