please help a newbie

hi all,i learned C++ in class XI and XII using borland C++, but when i try to code for some problems given in this site,the code compiles properly on borland C++ but the online compiler shows many errors.
I reckon that this is because the specifications are different, so can anyone please help me as to which is the latest and most widely accepted “rules” for coding (like ANSI specifications GNU etc)

Hello @ultra_flame,

I would recommend you using an IDE that compiles the code using the standard GNU compiler, like, CodeBlocks, as it is the same compiler used online… That might prevent you from running into weird Runtime Errors or Wrong Answers due to compiler flags or other sort of errors…

I suggest you read the FAQ, for further information regarding this subject and, last but not least, check other contestants accepted submissions as that might help you greatly!!

Happy coding and best regards,

Bruno

1 Like

It seems to me, that in your first problem you used conio.h, don’t do that. And in your submissions you are using things from std namespace without specifying it. Use using namespace std; in the code. Also I have to warn you, that cin and cout is slow, so it’s better to use printf and scanf if you do not want TLE.

1 Like
//