Coursework

Revision:
7:ce70a873aa70
Parent:
6:f7f30e0e3bed
Child:
8:770d168713cc
--- a/main.cpp	Wed Jan 05 20:57:32 2022 +0000
+++ b/main.cpp	Thu Jan 06 11:00:39 2022 +0000
@@ -3,6 +3,7 @@
 #include "N5110.h"
 #include "hcsr04.h"
 #include "Piezo.h"
+#include<string>
 // y  x  button
 Joystick joystick(PTB10,PTB11,PTC16);
 HCSR04 sensor(D14, D15); 
@@ -44,12 +45,28 @@
 //Buzzer.pulsewidth(1);   
 //Test Struct after research 05/01/22
 struct ObjectDefine{
-//td::string Object;
+int qwer;
     float  Distance;
+    char te;
+    double dubs;
+ string namestruct;
+    string ;
 };
+// Test Class 06/01/22
+class myClass{
+   public:
+   string nameclass ;
+   double dubss;
+   int inty;
+   };
+   myClass Class1;
+   Class1.nameclass ="firstclass";
   ObjectDefine Object1;
-// Object1.Object ="Wall";
+Object1.qwer = 12;
    Object1.Distance = 34;
+   Object1.te = 'A';
+   Object1.dubs = 23;
+ Object1.namestruct = "name";
     while(1) {
 //Tune(Buzzer,So6,8);
 //Stop_tunes(Buzzer);