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 a graphical (not text-based) visual c++ program

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  The program calls a function called getgrades

The program calls a function called GetGrades that will read in grades from the keyboard, the number of grades should also be input by the user.

  Write a literal representing the long integer

Write a literal representing the long integer value twelve billion.

  Write a program that uses a recursive method

Write a program that uses a recursive method to check whether a string is a palindrome and A palindrome is a string that reads the same both forward and backward.

  Write class player contains attributes for players name

Write a class player contains attributes for the player's name, average and team. write 3 functions to input change and display these attributes. also write a constructor that asks for input to initialize all the attributes

  Write a programme on credit card number check

Credit Card Number Check. The last digit of a credit card number is the check digit, which protects againsttranscription errors such as an error in a single digit or switching two digits

  Solution to the naur text-processing problem

Design and implement a solution to the Naur text-processing problem using the language specified by your instructor. Execute it against test data and record the number of faults you find and the cause of each fault

  Before each sort, write psudo-code

Ceate a single cpp ?le (FILE=MAIN2.cpp) containing all three elementry sorts(bubble, insertion, selection). Before each sort, write psudo-code and invarient analysis of the sort in block comment style. Add the code from 3.). Generate a list of 100..

  Draw the heap

Eric Rowe Starting with an empty minheap, draw the heap after each the completion of the following operations  and repeat for a maxheap (replace removeMin() with removeMax()). Upload your drawings here. Hand drawn is fine:

  Is a void function a function that does not return a value?

Is a void function a function that does not return a value?

  Generate the output below using the function

Make a C program that will generate the output below using the function that will pass the value into the function.

  Compares the number of possible sequences

A c++ program that compares the number of possible sequences of the length L that can be generated uinder the following assumptions. Given an alphabet of size N=9. The program must output a formatted list comparing the number of possible sequences..

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