The Beastie Forums
String class for testing - Printable Version

+- The Beastie Forums (http://beastie.cs.ua.edu/mybb)
+-- Forum: Analysis of Algorithms (http://beastie.cs.ua.edu/mybb/forumdisplay.php?fid=3)
+--- Forum: Project 0 (http://beastie.cs.ua.edu/mybb/forumdisplay.php?fid=4)
+--- Thread: String class for testing (/showthread.php?tid=180)



String class for testing - ianbway - 09-13-2017

Some of the tests implement a string class. I'm assuming this is similar in structure to the integer and real classes?


RE: String class for testing - alexbusol - 09-14-2017

Yes, I need that one as well. Can someone post it please?

Actually, I just went through some of the test files that have string.h included and it looks like it isn't used at all. I just commented it out


RE: String class for testing - ianbway - 09-14-2017

(09-14-2017, 01:09 AM)alexbusol Wrote: Yes, I need that one as well. Can someone post it please?

Actually, I just went through some of the test files that have string.h included and it looks like it isn't used at all. I just commented it out

It is used in the "-2" test of every class on mine. I think my string class works but not sure if I am allowed to post the code. Basically it is very similar to the real and integer classes only the type of variable your are moving around is a char*.

(09-14-2017, 01:45 AM)ianbway Wrote:
(09-14-2017, 01:09 AM)alexbusol Wrote: Yes, I need that one as well. Can someone post it please?

Actually, I just went through some of the test files that have string.h included and it looks like it isn't used at all. I just commented it out

It is used in the "-2" test of every class on mine. I think my string class works but not sure if I am allowed to post the code. Basically it is very similar to the real and integer classes only the type of variable your are moving around is a char*.

You also may want to import <string.h>,<limits.h> into your implementation file for string. I'm not sure if this does anything but I used it in mine.