I have found the site: http://studiostyl.es/ which specializes in Visual Studio 2010 themes. However, it appears that all of these themes are built with C# and .NET development in mind.
I am currently trying to get into some C++ programming and couldn't find anything on the subject of special themes for C++. Right now, almost all of my C++ code is a plain color and it looks like I might as well be writing it in notepad.
It may even be that I have my settings messed up and that those themes from studiostyles are supposed to be for all languages; I just started using Visual Studio.
Thanks for any replies.
No, the problem is that Visual Studio simply doesn't have anywhere near the built-in syntax highlighting support for C++ as it does for C# or VB.NET. Some syntax highlighting does work. For example, strings, comments, preprocessor directives, operators, numbers, and the built-in keywords all get their own colors. But a lot of your code will indeed be in one color ("Identifiers") if you don't lift a finger.
As Jerry suggests, Visual Assist X offers far better syntax highlighting than the default. But it's not free.
If you're like me and looking for a low-budget solution, you can define your own keywords. This will at least make them show up in the color earmarked for "User Keywords". The link explains what you'll need to do in more detail, but it's really as simple as placing a plain-text file named "usertype.dat" in the Visual Studio application folder, and typing each of the custom keywords that you want to appear highlighted in their own color on a separate line. You'll have to restart the IDE for your changes to take effect.
Since you're using VS 2010, another free solution is the Highlighterr for Visual C++ extension. This is one step up from defining your own keywords, and gets a little fancier with syntax highlighting. It takes advantage of the new Intellisense support in VS 2010 to turn on highlighting for classes, structs, macros, and typedefs. I haven't installed it yet myself because I'm still doing C++ development in VS 2008, but I'd very much like to try it out.
Get Visual Assist X and don't look back.
Edit: There is also Refactor! for C++. As you can guess from the name, it's oriented primarily toward refactoring code, but if memory serves can also do some colorizing and such. I haven't used it recently enough to say much more than that (I've used VA-X for years, and a couple of years ago decided to look at alternatives, but after a month or two of testing, decided to stick with VA-X).
Related
For a long time i was programming in Visual Studio 2010 in C#. Really good thing there was extensive documentation in Lntellisense. Lately i have decided to switch to C++ Win32 (which i believe is Native C++, am I right?). I have then spotted Intellisense is only showing functions' declarations (with no descriptions and with no parameter descriptions). It really makes programming hard as it is hard for me to remember all of the functions' parameters.
So the is: is there any way to make Intellisense to show documentation and parameter list descriptions for C++ win32 just like it was in C#?
If there is no such way, so is there way to provide my own XML documentation for existing win32 functions for C++? I could then write documentation for my most used functions for myself, which would be really helpful.
I have also noticed typing three slashes before function declaration does nothing (in C# it was used to write XML documentation for specified objecT). Is there any way to bring back such functionality?
You can try using Visual Assist X for better intellisense. It's a commercial tool (I'm not affiliated with them but I've been using it for a while). It provides features for most of the things you asked for through enhanced intellisense and macros / shortcuts.
For the most part I like it but there are some annoying issues with it that I had to learn to live with. Support is all right but every once in a while they break something that used to work before.
I am new to C++ Builder. I am trying out the XE4 version, but it doesn't seem to have autocompletion for include or checking and underlining a bad syntax like for example VS does. So I can put any rubbish and the editor doesn't indicate in any way that you made a mistake in your code. And as for auto completing include: when including headers it doesn't indicate anything if the headers exists. Does any one knows if these 2 features should work in C++ Builder XE4 and you just need to switch them on somewhere or they don't exist in this IDE ?
Thanks
I haven't used C++ Builder XE4 ... but on earlier versions, you could go into Tools > Options > Editor Options > Code Insight.
Q: Does that option exist in XE4? Does it help?
ALSO: http://docwiki.embarcadero.com/RADStudio/XE4/en/Code_Completion
I have the same problems for years now. It's only my personal opinion, but I think this kind of things are broken in C++Builder. The main IDE / programming language is Delphi / Object Pascal. They work and write primary with this one and make all kind of wrappers, etc. for C++ afterwards. In Delphi everything works normally. In C++ autocomplation DOES work, but seldom. Sometimes it pops up and sometimes not. I never managed to get syntax checking to work in realtime. Only after compilation the checking starts... sometimes. There are other things which don't work too, like the Refactoring feature which I use (in Delphi) to find and add missing libraries/headers to the "uses" list. This worked partly in previous C++Builder XE versions but doesn't work at all now. Also, all this features seems to be much slower in C++Builder.
That's sad. I liked the solid functionality in Borland's products, like in C++Builder 6. The documentation system (help) worked there wonderfully too. In Delphi / C++Builder it is slow and incomplete, because it is made with one of the worst documentation systems at all: Microsoft Document Explorer. :-(
I'm porting VC++7 codebase to VC++9. Surprisingly Visual Studio 2008 highlights internal as a keyword in C++ code but looks like it is not really treated as such.
What is this - a bug in VS, an environment setting I haven't found yet, or a sign that I will no longer be allowed to use internal as a regular identifier in some upcoming version? What's my best move in this situation?
I am not sure but I think internal specifier can be used in C++/CLI projects. So, since there is only a difference of one project setting between a non C++/CLI project and a C++/CLI Project, therefore, it might be that it is being highlighted because of this reason.
[Edit] Just checked, internal IS a keyword in C++/CLI and generates similar IL to the one generated by a C# project. So, my original thinking seems right. It seems to be a one parser for all flavors of C++ from Microsoft.
Just ignore it. The "problem" is just that not all parts of Visual Studio properly distinguish between C++ and C++/CLI. So certain C++/CLI keywords get highlighted even in plain native C++. (array is another one).
This only affects syntax highlighting, not the actual compiler.
So the only reason to avoid these words is if you 1) find the bad syntax highlighting too annoying, or 2) plan on porting your application to C++/CLI.
The problem is that the parser used for highlighting is not one of the real C++ parsers. "One of", because VC++, C++/Za and C++/CLI are three dialects with different parsers. The VS pretty printer uses a common parser that doesn't always get it right. E.g. it has a single set of keywords, so it always assumes "internal" is a keyword.
I've recently started to learn C++ and am completely confused with the choices of IDEs and compilers out there. I am competent with interpreted languages and like the simplicity of using any IDE or text editor and then running the interpreter from the command line. Everything works as I expect, regardless of the IDE used, because I use the same interpreter each time.
Now that I have started learning C++ I am overwhelmed by the choice of different compilers and more importantly, their differences. It seems that things will be simpler for me (not necessarily easier) if, while learning, I use a text editor and a compiler that I run from the command line. I have a basic understanding of how compiling and linking works and I understand the role of header files.
Firstly, are there any books or websites that teach C++ from this approach? (IDE-less)
Many books try to point out the differences between IDEs and compilers by selecting two and comparing them, which confuses me.
Secondly, how should I set up my workflow? (Ignore the choice of text editor, I am talking about compilers, linkers etc.) I am struggling to understand what differences different compilers have and so please bear this in mind when answering. It seems like the most popular compilers are g++ and CL.
Similar question but I am more interested in why some programs will work with some compilers and not others: C++ Compiler for Windows without IDE?
Further information: I am developing on Windows and from what I understand, it seems that there is 'pure' C++ and then C++ that is somehow related to windows, is this Visual C++? I would like to write programs that make use of Windows features but I want to know when I am using windows features and when I am writting code that would work on any platform.
Update: So it seems that I shouldn't be worrying about compilers when I am just starting out. The reason for me wanting to understand the differences is because I don't want to write code for a specific compiler and get into bad habits. Is this a non-issue?
Firstly, are there any books or websites that teach C++ from this approach? (IDE-less)
Yes, definitely. Stroustrup's book has already been mentioned. For learning C++ I'd also recommend two other books: If you like thorough explanations and don't shy away from 1000 pages, look at Lippman et al. If you rather like a short introduction and don't fear a steep learning curve, look at Koenig/Moo. Both are excellent books. (BTW, a good place to look for good books has always been the book review section at the ACCU.)
As for which tool chain you want to use: If you rather have a standalone editor and invoke the compiler from the command line, you can do this with either GCC or VC. This approach has the advantage that it is more unlikely to lure you into using something proprietary (like C++/CLI). If you would like to try an IDE, VC Express is fine, once you're past setting up a new C++ project. Of course, the number of options you can tweak for a new project can be very overwhelming. But on the other hand you get things like an integrated debugger. Note that there are other integrated solutions, too. The most mature and prominent is probably eclipse.
Edit: If you don't mind spending a little money, look at Comeau. It's not free, but it's not expensive either and it's usually considered to be the most standard-conforming C++ compiler around and has excellent error messages. (You can test-drive it at the website.) Note that it emits C code, though. That means you have to have another compiler to create an executable program. But both GCC and VC Express will do, so there's no other cost. (Note that using VC you will get Dinkumware's std lib implementation, which is also considered to be a very good one.)
Use MinGW - it's a command-line C++ development toolchain that allows you create Windows applications. The SO link you quoted seems to have all the relevant details, so I don't really understand why you posted this question.
Firstly, are there any books or websites that teach C++ from this approach? (IDE-less)
Start from reading The C++ Programming Language book. Written by Bjarne Stroustrup, the creator of C++, this is the world's most trusted and widely read book on C++.
Take a look also at Programming — Principles and Practice Using C++. It is an introduction to programming for people who has never programmed before. It will also be useful for people who have programmed a bit and want to improve their style and technique - or simply learn modern C++.
I am developing on Windows and from
what I understand, it seems that there
is 'pure' C++ and then C++ that is
somehow related to windows, is this
Visual C++? I would like to write
programs that make use of Windows
features but I want to know when I am
using windows features and when I am
writting code that would work on any
platform.
MS Visual C++ 2008 Express is a free IDE aimed at folks like you, it's available by download from Microsoft, I recommend you try it out.
Visual C++ is the name of the IDE program package. Installing it installs many things including the compiler cl.exe, which can compile, depending on settings, program written in either the C, C++, or C++/CLI programming language (for the .Net framework).
You can use the compiler on the command prompt without the IDE by (for example) selecting Start > Programs > Microsoft Visual Studio X > Visual Studio Tools > Visual Studio X Command Prompt. This execute a script which sets various environment settings needed to compile programs before giving you the command prompt.
On Windows I'd recommend you Visual Studio Express - it's free and is widely accepted by C++ programmers on Windows platform.
Since you're starting to learn language, don't bother yourself with differences, advantages/disadvantages of compilers and IDEs - leave it when you'll be more proficient with the language and will be involved in writing real program.
I actually suggest IDE approach, Microsoft Visual C++ Express Edition should do the trick. Excluding some fancy syntax most C++ compilers behave the same way. C++ is a language that has a very small standard library (covering mostly I/O functions, basic math etc..) this is probably what you refer as pure C++. For something more advanced you'll have to use system libraries.. In example if you want to write windows gui application you'll have to include windows.h header file which is platform specific and exists only on windows compilers..
If you won't use an IDE, you definitely want to use Makefiles to organize your workflow... and you can make easily from emacs or vim.
Anyway, may I suggest you to use a very simple, almost non intrusive IDE, that could be great for learning purposes: http://www.bloodshed.net/devcpp.html
It comes with the MinGW compiler bundled, so it's just install and go.
I'd say to start out with Visual Studio. This is a great IDE for programming C++ on windows, might as well use it when it can speed up certain things a lot.
The differences between compilers aren't that huge - if you can write solid code in VS then it shouldn't be a problem to figure out how to get your code working in GCC/G++.
As for books; Exceptional C++ by Herb Sutter and The C++ Programming Language by Bjarne Stroustrup are a great read.
Visual Studio is the way to go when developing for Windows.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm about to start work on my first C++ project. I've done lots of C# and VB (VB6 and VB.NET), plus Java and a few other things over the past 10 years or so, just never had a requirement for C++ until now.
I plan to use Visual Studio 2008, but I'm interested to find out from experienced C++ programmers whether Visual Studio is a good IDE for a C++ newbie.
Will VS in any way make it harder for me to learn to program C++ correctly?
Will VS encourage any bad habits?
Are there any pitfalls I should look out for?
First off, VS 2008 is quite powerful and probably one of the best IDEs for C++ programming (at least with a supporting plugin such as Visual Assist X).
Beware, however, that C++ is a hard language to get right for the compilers and that the default warning level is quite lenient to boot. So it will tolerate bad/wrong code quite often. It is always advisable to check the code on other compilers as well – at the very least in g++ with high warning level in strict mode.
Also setting the warning level higher in Visual Studio is encouraged.
Visual Studio is an excellent IDE for C++. If you know it from C#, it will be comfortably familiar.
There is something to be said for starting to learn a language like C++ by not using an IDE at all, but by building from the command line. This will impress on you the various phases of the c++ compilation and linking process, and will serve you in good stead if you ever need real cross-platform portability.
VS 2008 is fine for developing C++. Like someone else said I would purchase Visual Assist X simply because it gives you Intellisense on steroids and a better code outliner. Also the MSDN docs you get with VS are excellent quality and include a full description of the C++ language and standard library. On Windows you would be mad to use anything else.
Use Visual Studio, especially if you already know it through C#. I agree with the others that you should invest in Visual Assist though.
You better off with code-editor + build tools
as an IDE, VS is pretty bad (subjective). There are a lot of alternatives (more lightweight, for sure)
By build tools I mean not only compiler but also some kind of make/jam etc
This way you'll be ready for real cross-platform development (first) and as a bonus you'll get the possibility for much quicker and comfortable builds for "not small" projects -- one command builds everything. And while you can get the same in VS (really?) it will be faster. Plus you can have project structure the way YOU want 8)
As for reference, for my pet-project i use source insight + kjam + msvc compiler
I remember a few years ago having some troubles with VS. Actually the problem was with the C++ compiler, because they didn't implemented some features of the language, or at least they didn't implemented in a standard way.
We switched to Eclipse CDT because it was relatively easy to use other compilers, supported custom makefiles, and multiple targets.
But if you plan to develop for Win32, VS it's probably the safest choice.
I'm doing something similar; I've done a lot of Java programming and started learning C++ not too long ago. When I am starting to learn a new language, I like to work through the various bits of syntax differences by writing smaller programs. As great as Visual Studio is for larger projects, I think it tends to add a lot of bulk for that kind of practice. I'm with Konrad on the command line idea - great place to start. I am also using Dev-C++ for the smaller projects. It's a nice, compact little gcc IDE that is only about 60MB total footprint on the hard drive, and it compiles to windows executables without any problem. Good luck in your endeavors!
Yes, use Visual Studio, it's an IDE you already know, so it has the lowest learning curve in terms of tooling. Since you've never done any C++ before, please use the IDE, not a console window to learn. The one thing you will miss is the .NET framework. You can use Managed C++ with VS, but if you plan on using pure C++, with no managed code at all, it's going to be scary at first.
One thing I've always noticed about C++ is that if you expect all the same tools you had with C# to be there for C++ when you start, you might be disappointed. VS is a great IDE, and it's had C++ support long before .NET came around, so trust it, enjoy it, and remember, nothing is perfect.
I asked a similar question here except using C on Visual Studio. Although I personally couldn't imagine doing C# without VS, I find using VS for C an exercise in masochism. I know this isn't exactly the same as what you're asking, but if you find that it is a similar experience in C++, know that it's not just you.
Using VS allows you to not having to get under the hood and understand how the chain of buildtools work. Use VS to automate what you know how to do manually and make sure you understand what happens behind the scenes. In the world of C++ you are more expected to understand the build chain than in high level languages like C# or VB.
If you're using the VC project system, you should be fine. If, however, you are using a makefile-based project, it's extremely important that you tell the IDE about your include paths, preprocessor macros, etc, so that intellisense will work correctly.
Some people form a bad impression of Visual C++'s code browsing capabilities because they are used to C# where there's no configuration required.
Another thing to be aware of: occasionally, I have found that intellisense stops working well in a project where I have worked for a few days or weeks. If your solution is called foo.sln, deleting the foo.ncb file will cause the IDE to reparse your code, and intellisense will start working again.
Finally, I've heard that VS 2010 will be a major improvement to the C++ IDE experience for the first time in years.
http://blogs.msdn.com/somasegar/archive/2008/11/21/c-enhancements-in-vs-2010.aspx
Yes, use visual studio, but be aware that applications that you build with it wont run on some computers unless they have the visual studio runtime redist installed. If you find your app wont work on other machines, go download it.