Switching between float and double precision at compile time
Where should I look if I want to switch between float and double precision at compile time. For example, if the user wants everything in floating position instead of double precision, how can I maintain this flexibility? In other words, how do you define a variable that can be either floating or conditionally double precision?
+3
source to share
3 answers
Without knowing exactly how you intend to use the data, it is difficult to recommend the right solution.
Look at the union date type .
http://msdn.microsoft.com/en-us/library/5dxy4b7b(v=VS.80).aspx
Templates will also be viable depending on use.
+1
source to share