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

Vararg and how to use it?

$
0
0
Hi! I need help with how to write a function that takes any no of char arrays. It's involved with "..." param i know but im confused on the exact syntax: manyWrite (100, 100, "First text", "Second text"); // call the function like this manyWrite (int x, int y, ...){ //loop over the infinite arguments :) myWrite(x,y + index*20, argument[index]); } Many thanks!

Viewing all articles
Browse latest Browse all 17825

Trending Articles



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