Advertisement

Programming

Started by December 06, 2001 02:00 PM
1 comment, last by chris2doragon 22 years, 11 months ago
Can someone help explain to me what return types actually do.
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

Advertisement
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