Thread
:
C++ pointer help
View Single Post
Reply
Posted 2006-02-06, 11:09 PM in reply to
Demosthenes
's post starting
"Check this out:..."
ok, what about this peice of code, what is it saying(from the "for dummies" book):
--------------------------------
#include <stdio.h>
#include <iostream.h>
class Student
{
public:
int semesterHours;
float gpa;
float addCourse(int hours, float grade){return 0.0;};
};
int main(int argc, char* pArgs[])
{
// create a Student object
Student s;
// now create a pointer to a Student object
Student* pS;
// make the Student pointer point to our Student object
pS =& s;
return 0;
}
------------------------
even w/ the comments, i still don't get what each pointer symbol means/does
Profile
PM
WWW
Search
sciencekid