Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Problem using user-defined data types

$
0
0
So im trying to make my own data type out of a class that takes two integers, in this case x and y, for the use of a non std container type. the type im using is simmilar to standard types, but it was made by a person I know that has been coding for a long time and it is simply more effecient, so I dont think its a problem with that I think im mis-understanding user-defined data types

as far as I know

room_dimensions::room_dimensions (int inX, int inY) // Constructor to call when x and y values are present
     {
        int x = inX;
        int y = inY;
     }



should accept use such as vector<room_dimensions> sample, or in my case, SGL_QUEUE<class room_dimensions> sample_grid; but either way its not taking it. Did I miss something in my learning of user defined classes as data types or...

Any help would be appreciated. Thanks.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>