cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
return string_value or return char_value
return string_value or return char_value
Mar 11, 2014 at 3:25pm UTC
enemy
(470)
Hello!
Please, if we want the function to write sth, is there ANY way t odo it using return?
Can return return ONLY numbers?
Please, if somone has links about it!!!
Many thanks!!!
Mar 11, 2014 at 3:31pm UTC
firedraco
(6243)
I'm not sure what you are asking? You can have a function return any type you want, but it must be consistent.
Mar 11, 2014 at 7:36pm UTC
enemy
(470)
Can a function return string too? Or char?
I mean return by return, not by cout!
Last edited on
Mar 11, 2014 at 7:36pm UTC
Mar 11, 2014 at 8:26pm UTC
NinjaMKD
(1)
I tried to return a string, but i get an error which says that it cannot convert it to int which means that you can return with int only. but can you add more detail on what you actually want to do ?
Last edited on
Mar 15, 2014 at 6:43pm UTC
Topic archived. No new replies allowed.