Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Error when returning a Pair from a function

$
0
0
Maybe today I'm confused and I'm missing the obvious... I've made this simple struct inside my Utility.h template<typename TFirst, typename TSecond> struct Pair { Pair(TFirst f, TSecond s):First{f},Second{s}{} TFirst First; TSecond Second; }; And I'm using it from App.h (which #include "Utility.h") like so: App.h Pair<Uint32, Uint32> GetWindowSize(); App.cpp Pair<Uint32, Uint32> App::GetWindowSize() { return Pair<Uint32, Uint32>(Width,Height); } And I'm getting a cascade of errors ALL on line 39 (image below). Any idea what I am doing wrong this time? x_x EDIT: please mod delete this topic, I just remembered Utility.h put everything inside namespace util, sorry x_x

Viewing all articles
Browse latest Browse all 17825

Trending Articles



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