🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Programming

Started by
1 comment, last by chris2doragon 22 years, 7 months ago
Can someone help explain to me what return types actually do.
Advertisement
They don''t really do anything. They''re there for you to determine what happened in a function or to use outside of the function as you see fit.

Breakaway Games

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

the return type of as function is the type of value it returns... for example:

// in c/c++// this function returns and integer...int SomeFunc(int SomeArg)  {  return ++SomeArg;  };// so, if you want to do something with the function''s return, you need to expect that type:int SomeInt;SomeInt = SomeFunc(4);// this would cause a problem, because SomeFunc returns // an INTEGERchar SomeChar;SomeChar = SomeFunc(4); 


did that make sense?


--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

This topic is closed to new replies.

Advertisement