So I’m very new to C and I know I’m probably approaching things all wrong, but I would appreciate any advice you might be able to offer.
My Ascii art program seems like a general solution to me (not hard coded for the IDE tests) and it passes all the IDE tests but fails many validation tests. I don’t know if it’s taboo to post the code but here it is (my apologies if this is frowned upon). I’m not looking for anybody to just fix the code for me, but I’d love it if you could provide me with a clue about why it fails validation tests that seem very similar to IDE tests. (Example: it passes MANHATTAN, but fails HELLOWORLD).
Please feel free to dump my code into the IDE and see how it behaves. Thanks in advance for any advice. Here is my code.
Edit: No full code allowed.
something is wrong with result string concatenation, i had different code which passed test but did not pass validation
only when i started printing parts of letters by separate printf’s i got rid of this
I just changed the print statement and some indexes and it works well.
The best advice I can give you is to install an IDE. It may sound scary for a beginner, but you really should try to run your program this way. A real IDE is *way* more helpful in finding bugs. With codingame you can only see the output after your program has finished. With an IDE you can run your program step by step and see what happens along the way. This makes it a lot easier to narrow down the bugs. You could try Dev-C++, it’s not to convoluted and easy to install on windows if I remember correctly.
Thanks for the advice, and sorry for the code post! Now I know, won’t do it again!