pointer press

// experimenting with weight pointer and myslot
#include <iostream>
using namespace std;

int main ()
{
int firstweight, secondweight; // all weights are integer values
int * mymachine; // you can select just integer weights
int * press; // 01 has a pointer
int sentenceone;

press = &sentenceone;
*press = 50;
mymachine = &firstweight; // the address of firstweight is 14
*mymachine = 55; // 55 is the value of the weight that the pointer of mymachine points to
mymachine = &secondweight; // the address of the secondweight is 14, too
*mymachine = 70; // 70 is the value of the weight that the selector points to
cout << “sentence one of the press is ” << sentenceone << endl;
cout << “firstweight is ” << firstweight << endl;
cout << “secondweight is ” << secondweight << endl;
return 0;
}

Comments are closed.