Search Results

Search found 2 results on 1 pages for 'user1777711'.

Page 1/1 | 1 

  • C++ How to read a string of text and create object of their class

    - by user1777711
    After reading a text file... The following information is available Point2D, [3, 2] Line3D, [7, 12, 3], [-9, 13, 68] Point3D, [1, 3, 8] Line2D, [5, 7], [3, 8] Point2D, [3, 2] Line3D, [7, -12, 3], [9, 13, 68] Point3D, [6, 9, 5] Point2D, [3, 2] Line3D, [70, -120, -3], [-29, 1, 268] Line3D, [25, -69, -33], [-2, -41, 58] Point3D, [6, 9, -50] The first data separate by the delimiter comma is the class name. for each of the 4 class Point2D,Line3D,Point3D,Line2D How do i like store them into relevant object base on their class means.. when it read first line Point2D, [3, 2] It will store it as Point2D object with the Data [3, 2] But the issue is what dataset should i pick, Vector, Set , Map or List I was thinking to actually create a data set then but i can't use new Point2D(); since Point2D is parent of Point3D Line2D is parent of Line3D and theres no parent class of Point2D and Line2D. how can i like create a object of them in a data set like e.g Vector so Vector[0] is of Point2D class with data [3,2] , then Vector[1] is of Line3D class with data [7, 12, 3], [-9, 13, 68] Thanks for helping.!

    Read the article

  • SQL Check Constraint cannot reference other column

    - by user1777711
    I trying to add this sql check in ALTER TABLE School add Role check_role CHECK (check_role IN ('Teaching Assistant', 'Lecturer', 'Professor')); I get the error below ERROR at line 3: ORA-02438: Column check constraint cannot reference other columns SQL> desc School; Name Null? Type ----------------------------------------- -------- ---------------------------- STAFFNUM NOT NULL VARCHAR2(12) NAME NOT NULL VARCHAR2(50) ADDRESS NOT NULL VARCHAR2(300) DOB DATE I am trying add a column call Role, with the check constraint check_role I am using Oracle SQL. Thanks for all help!

    Read the article

1