Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse creating projects every time to run a single file?

i am a beginner using eclipse CDT. usually in DEVc++ or other lightweight IDE's we can directly open and edit a single .cpp file from desktop and run it.

on the other hand i cannot find this simple feature in eclipse CDT! everytime i need to run a single .cpp file i need to create a project!

for competetive programming such as in TOPCODER copetetions or CodeForces i usually want to run single files quickly!

is there a way to run single .cpp files in Eclipse CDT without needing to create a project everytime?

like image 352
Shivendra Avatar asked Jun 18 '13 08:06

Shivendra


1 Answers

Eclipse is great. I love it, but you are right, there is too much burden with one-file projects. So maybe approach problem in different way:

  1. Write code in Eclipse enjoying all IDE features.

    Put all your one-file programs to single project. No, Eclipse won't compile them because of multiple main functions but...

  2. Compile file from command line.

    You can copy proper command line from Eclipse console when building project. You must be smart because you are playing topcoder so you figure out how to alter command line for your need. ;)

like image 139
omikron Avatar answered Oct 21 '22 06:10

omikron