Hi guys i know that in linux you create a c file and use make or gcc or clang to compile it and then run it.
My question is how do you run a c file or c++ file in vs2012 with out creating a solution.
Also how do you creat a solution for ready created scoure codes

Re: Runing C file in vs2012 80 80

My question is how do you run a c file or c++ file in vs2012 with out creating a solution.

Run the compiler from the command line. I'm not aware of any out of the box way to do it in the IDE, but you could create your own external tool that runs cl.exe on the selected open file. If it's just one file, I'll just copy/paste the contents into my scratch project.

Also how do you creat a solution for ready created scoure codes

Create the project, then add existing files as opposed to new files. There might be a utility out there that generates a solution from the contents of a folder automatically, but you'd have to search around for something like that. I just do it manually.

Re: Runing C file in vs2012 80 80

Ok thanks. I will search around to see if i can get one (utility for adding files to a solution automatical) if not i will try and see if i can make one. what do you thing?

"like a boss" you are indeed a boss, deceptikon by the way why do you use the name deceptikon?

Re: Runing C file in vs2012 80 80

by the way why do you use the name deceptikon?

There's no real reason, I picked it on a whim. ;)

Re: Runing C file in vs2012 80 80

hahaha i hear you boss

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.