English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

BetterCourse better("CSMDSI", "Data Structures");
cout << endl << better;

i have a class BetterCourse na di want a toString method like in Java. how do i do that in c++ so the above code will work?

2006-10-08 22:05:23 · 2 answers · asked by origamix60 3 in Computers & Internet Programming & Design

i cant, call another method inside the class, my tutor wont allow it.

2006-10-08 22:16:43 · update #1

Joe_Young, dude if you dont know dont tell me to learn, and give me a search link, fool!

2006-10-08 22:54:52 · update #2

2 answers

Add a new method to the class that returns a string type, and call the method inside the object instead of the object itself.

Rawlyn.

2006-10-08 22:12:28 · answer #1 · answered by Anonymous · 1 0

origamix here is your link try it

http://www.google.co.uk/search?hl=en&q=C%2B%2B+help&btnG=Google+Search&meta=

2006-10-09 05:21:41 · answer #2 · answered by Joe_Young 6 · 1 2

fedest.com, questions and answers