answersLogoWhite

0


Best Answer


You begin by writing the source code. Any errors at this stage (syntax time) must be fixed before proceeding further. The IDE (integrated development environment) will usually highlight syntax errors as they occur.

When the source code is ready it can be compiled. Any errors at this stage (compile time) must be fixed before compilation can complete. Again, the IDE should highlight these errors.

Successful compilation creates individual object files which can then be processed by the linker. Any errors at this stage (link time) must be fixed before an executable is created. Once again, the IDE will assist you.

Once the executable is created it can be run. Any errors at this stage (run time) must be fixed before code is finally ready to ship. The IDE won't help you unless you make a debug version of your executable, which can then be debugged in your IDE to locate logic errors, unhandled exceptions, etc. When the debug version works as expected, you can build a release version. After a final check for run time errors, the program is complete. Don't delay. Ship it!

Although there are many stages to creating an executable, the IDE can reduce the workload by creating a MakeFile for your project, which automatically builds the application for you (both debug and release versions) only stopping when an error is encountered.

If your source code includes conditional compilation for a variety of platforms and architectures, the source must be compiled separately for each using the intended platform for each.


User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

In Visual Studio, a C++ program can write to stdout, if it is a console application. It can also write to a file, to a message box, to the debug window, or to a normal window in response to the WM_PAINT message.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

You can type the program in any editor, for example, NotePad. Then, you need a special program (a C++ compiler), to convert your program into an executable. However, it is more common to use an integrated development environment instead of a separate editor and compiler. The IDE (integrated development environment) includes an editor, and, if there is an error during compilation, shows you where the error is.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

C++ programs work the same as all compiled languages: the source code is compiled and linked to produce platform-specific machine code instructions that can then be executed upon that platform. The same source code may be compiled upon many different platforms, however each platform requires a different set of headers, libraries and platform-specific functions. Compiler directives can be used to provide all the alternatives within a single source which can subsequently be filtered out by the compiler according to whichever platform or IDE (integrated development environment) you're currently compiling upon.

This requires a great deal of time and effort on the part of the programmer, unlike Java where a single source can be compiled upon any machine that has a Java virtual machine implementation (which is pretty much everything these days) and run upon any other platform without any changes to the source. The difference is that the source is compiled to byte code, which is then interpreted by the Java virtual machine. The end result is that while a Java program executes many times slower than an equivalent C++ program, it is extremely portable: the program need only be compiled once for all platforms, rather than once for each individual platform as it is with C++.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

C++ code can be written using any plain-text editor (such as Windows Notepad). However, it's best to use an editor that actually understands the syntax of the language itself and can highlight errors in much the same way as a word processor can highlight spelling and grammar errors. However, just as you need a decent grasp of the English language in order to write English documents in a word processor, you also need a decent grasp of C++ in order to write C++ code in a code editor. Once your code is written and checked for syntax errors, you can compile and link it to produce an executable. Both the compiler and the linker will perform additional checks upon your code as part of the compilation process. Only a fully-compiled program can be linked and only a fully-linked program can be executed. However, even if linking is successful, the program may still contain logic errors at runtime. These need to be traced, fixed, recompiled and linked.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

To write a C++ program all you need is a plain-text/ASCII editor to input the source code. Indeed, that's all you need to write any program in any language. However, a plain-text editor cannot help you debug your code. For that you need an editor that is specific to the language. Just as a word processor can highlight grammar and spelling errors, a programming language editor can highlight syntax errors in your code.

In addition to an editor, you will also need a C++ compiler and linker in order to translate your C++ source code into machine code. Other tools you will need include a debugger, resource editor, software development kits (SDKs), application programming interfaces (APIs) and a selection of libraries and utility programs. An integrated development environment (IDE) helps to bring all these separate tools together.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

Here are the list of needed things to write a C++ program:

  1. A working computer - This computer must already have an operating system installed (eg. OSX, Windows, Linux, etc..)
  2. A text editor - A text editor is a program which enables you to edit text files. Examples of text editors are Notepad, Notepad++, Vim, LeafPad, Notepad2, and many more.
  3. Compiler - Compilers are the one who translates your C++ code to an intermediate (or object) code. Normally, they are the one who is responsible for making a *.cpp, to a *.o or *.obj
  4. Linker - Linker links libraries to your program. It can turn several object files to an executable file.

Nowadays, many programmers code in an IDE (Integrated Development Environment) which includes a text editor, compiler and liner, code checker, and many useful tools for developers (a great example is a memory scanner). Also, many compiler comes with a packed linker.

This answer is:
User Avatar

User Avatar

Wiki User

6y ago

C++ allows any combination of structured programming, procedural programming, object-oriented programming and template metaprogramming.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How does C plus plus program write in Visual studio?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Where do you find the applications such as visual basic or visual C plus plus in visual studio 2010 there appears to be no actual applications?

Once you have the Visual Studio program open, go to File->New Project and select the language you want to write your program in. If one or more languages do not appear, you probably didn't choose to have them installed when you installed Visual Studio.


Is there a way to program speech recognition in c plus plus with the express edition not the visual studio version?

The express edition's C++ implementation is no different to the visual studio implementation. It is the exact same language.


Is visual studio c plus plus 2010 free?

No. Visual C++ Express is free, but Visual Studio C++ must be bought. The Express edition is a subset of the Studio release.


What is the sort cut for running c plus plus program?

It depends on the particular IDE. Visual Studio uses <Ctrl>F5 to start a program in non-debug mode, and F5 to start a program in debug mode.


Which c plus plus supported by window7?

You can download latest version of Visual Studio from microsoft.com


What version of XNA is compatible with visual c plus plus 2010?

XNA Game Studio 4.0


What is use of ncp file in Visual Studio plus plus?

The .ncp file is Visual Studio is an internally maintained file that controls IntelliSense, amongst other things. IntelliSense is the popup window that shows you syntax and arguments for functions and other things. It is safe to delete, so long as you are not running Visual Studio. Sometimes, in older versions of Visual Studio, problems with IntelliSense can be fixed by deleting the .ncp file and the restarting.


What is the difference between visual studio and visual c plus plus?

Visual Studio is a developement environment that can support many different languages like C++, j#, Basic, etc. "Visual" is added to the names because Microsoft has tweak the langauages a bit in order to integrate the .Net functionality and other features the would like to support. C++ is a stand alone languages that was incorperated into Visual Studio package.


Does anyone no a good c plus plus or java free online no download compiler?

Visual Studio Express.


Is it possible to write a c plus plus program on Windows without installing any programs and if so how?

No, it is not possible. You need a C++ compiler, linker, and libraries, and you will only get them by installing programs, such as Visual Studio, or the GNU system. Technically, it's possible to WRITE one. You could use Notepad to do so. You'll just need the other programs if you actually want to compile and run it.


Does windows 7 operating system support c plus plus and c?

Yes, via Visual Developer Studio


How do you get Dark GDK Visual Studio C plus plus projects?

GDK tutorial websites are probably your best bet.