Errors

#include <iostream>
using namespace std;
#include <string>



class Person
{
public:
Person();
Person(string N,string A);
void initialize(string N,int A);

int getAge();
string getName()
Private:
string Name;
string age;

};
closed account (o3hC5Di1)
Hi there,

First off: please wrap any code you include in [code][/code]-tags, it makes it more readable.
Also, if you have any questions, please state them clearly and specifically.
Are you getting compiler errors or runtime errors, which ones? What is the program supposed to do?

All the best,
NwN
One quick thing I just noticed from reading this:

You should be getting a compiler error from line 16 and 17, where you have string getName() (no closing semicolon) and Private: (incorrect capitalization of a keyword, C++ is a case-sensitive language).
Last edited on
Topic archived. No new replies allowed.