I am in my second term of pogramming (nubie). I am writing a code for a class assignment. I am supposed to create a class and ask the user to enter stuff in the constructor. Then I am supposed to create a Print function that outputs that stuff. In main I am supposed to create a group object and a pointer this group object. My program is supposed to print using both the object name and the pointer name.
My problem is the pointer.....I'm not sure how to do this. I will post what I have and ask for your guidance again.
// Day7.cpp : Defines the entry point for the console application.
using namespace std;
cout << "Enter the number in the group: ";
cin >> NumberInGroup;
cout << "Enter the name of the group: ";
cout << "The group called \"" << Name << "\" has " << NumberInGroup << "members.\n";
Group *ptr = 0;
*ptr = obj;