0

Basically what I am trying to achieve is to pass an unknown number of variable, similar to ParamArray in .NET

I also need to be able to identify the type of the variables. However, all this without the use of CRT. Now would this be possible?

My goal is to serialize primitive datatypes to a char array.

Thanks for any suggestions :)

6
  • 1
    How variadic templates is related to crt ?
    – Jarod42
    Apr 13, 2016 at 15:50
  • variadic templates are really the only solution here
    – alex
    Apr 13, 2016 at 15:56
  • @alex How would I go on about retrieving the variable from the T ...? Edit: And checking its type; whethere it's a char*, int, etc. I will be operating with pointers.
    – Prionum
    Apr 13, 2016 at 16:06
  • @user2079303, Oh sorry, I wrote "no crt", but I think one of the keywords were unavailable to me, my mistake.
    – Prionum
    Apr 13, 2016 at 16:07
  • you need to be more specific what exactly are you trying to accomplish with your function?
    – alex
    Apr 13, 2016 at 16:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.