C++ Arrow Operator Example

PHOTO EMBED

Fri Apr 02 2021 11:14:20 GMT+0000 (UTC)

Saved by @cotterdev #c++

#include <iostream>

using namespace std;

struct student
{
	int age;
};

int main() {
	student steve;		//variable
	student *ken;		//ken is a pointer.  It points to the memory address which holds the ken struct.

	steve.age = 7;
	ken->age = 9;

	return;
}
content_copyCOPY