
Patrick B. answered 07/23/19
Math and computer tutor/teacher
Here ya go
=======================================================
using namespace std;
#include <iostream>
typedef struct _TDataRec
{
int X; // data members of a structure are PUBLIC default
float amt; // while data members of a class are PRIVATE by default
//constructor
_TDataRec( int x, float Amt)
{
X = x; amt = Amt;
}
} *TDataRec; //declare pointer to structure
int main()
{
struct _TDataRec myDataRec(7, 3.333f ); //calls the constructor
TDataRec dataRecPtr = &myDataRec; //points at it
std::cout << dataRecPtr->X << " " << dataRecPtr->amt << endl; // 7 3.333
}