View Single Post
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
First of all: stop being lazy. Remove the #define lines and write the code. Copy paste is cheap. Especially if you need to debug your code.

If you want to see what all your macros are expanded to, use the -E flag to your compiler, assuming you're using g++, and inspect the result.

As to the debugging: if you think that you need to use new to get a string instance, rewrite your code after figuring out what the call to getline() actually does.

Regarding asking for help: include how you compile it, including all warnings that you get. I'm very certain that you get quite a few...

And don't make friends if you don't have to. Having naked functions as friends indicates some other problem.
 

The Following User Says Thank You to Joorin For This Useful Post: