C++ examples for Data Type:struct
Copying Structures value
#include <iostream> using namespace std; struct Point3D// www . j a v a 2 s. c o m { double x; double y; double z; }; int main() { Point3D FirstPoint = { 10.5, 22.25, 30.8 }; Point3D SecondPoint = FirstPoint; cout << SecondPoint.x << endl; cout << SecondPoint.y << endl; cout << SecondPoint.z << endl; return 0; }