It depends on what compiler you’re using.
For example, if you are using Visual C++ .NET 2010 Express, run Visual C++ 2010 Express Command Prompt from the start menu, and you can simply compile and run the code.
> cl /EHsc mycode.cpp > mycode.exe
or from the regular command line, you can run vcvars32.bat
first to set up the environment. Alternatively search for setvcvars.cmd
(part of a FLOSS project) and use that to even locate the installed VS and have it call vcvars32.bat
for you.
Please check your compiler’s manual for command lines.
Related Posts:
- outputting ascii table in C++
- finding dll for “The specified module could not be found”
- How can I clear console
- How to go from fopen to fopen_s
- undefined reference to WinMain@16 (codeblocks)
- “X does not name a type” error in C++
- Windows 7 exception code: 0xc0000409
- Difference between ‘strcpy’ and ‘strcpy_s’?
- make: g++: Command not found
- VC++ fatal error LNK1168: cannot open filename.exe for writing
- MinGW: “gcc is not recognized as an internal or external command”
- LNK1168: cannot open debug\file.exe for writing
- VC++ fatal error LNK1168: cannot open filename.exe for writing
- How do I add the MinGW bin directory to my system path?
- How to get Current Directory?
- Cannot open Windows.h in Microsoft Visual Studio
- The program can’t start because libgcc_s_dw2-1.dll is missing
- Is there a replacement for unistd.h for Windows (Visual C)?
- CMake : C and CXX compiler identification is unknown Win10 CMakeGUI
- What is the source of the data for the ProgramFiles, ProgramW6432Dir, ProgramFilesDir (x86), CommonProgramFiles environment variables?
- LPCSTR, LPCTSTR and LPTSTR
- REGSVR32: the module “xxxxx.dll” failed to load … dependent assembly could not be found
- C++ convert from 1 char to string?
- Pause Console in C++ program
- Passing an array by reference
- What does int argc, char *argv[] mean?
- Meaning of = delete after function declaration
- Using NULL in C++?
- c++ “Incomplete type not allowed” error accessing class reference information (Circular dependency with forward declaration)
- C++ Error: undefined reference to `main’
- 1.#QNAN error C++
- What is the array form of ‘delete’?
- Error: Expression must have integral or unscoped enum type
- Use new operator to initialise an array
- Remove secure warnings (_CRT_SECURE_NO_WARNINGS) from projects by default in Visual Studio
- Undefined Symbols for architecture x86_64: Compiling problems
- “No viable overloaded ‘=’ ” why?
- Check if a string is palindrome
- What is an ‘undeclared identifier’ error and how do I fix it?
- Initializing a two dimensional std::vector
- What does “<<" and ">>” mean in C++ for cout/cin?
- C ++ error: a expected initializer before [function name]
- invalid new-expression of abstract class type
- std::string to char*
- Does the ‘mutable’ keyword have any purpose other than allowing the variable to be modified by a const function?
- Returning multiple values from a C++ function
- Eclipse C++ : “Program “g++” not found in PATH”
- no default constructor exists for class
- Press Enter to Continue
- How to trim a std::string?
- Parsing a comma-delimited std::string
- Random number c++ in some range
- C++: std does not have member “string”
- Fatal error: ‘stdafx.h’ file not found
- What’s the syntax for declaring an array of function pointers without using a separate typedef?
- What is the difference between const_iterator and non-const iterator in the C++ STL?
- Sorting Linked List C++ with pointers
- Best C/C++ Network Library
- How to check that an element is in a std::set?
- QltAW.png
- std::wstring VS std::string
- C++ string to enum
- c++ “Incomplete type not allowed” error accessing class reference information (Circular dependency with forward declaration)
- why is string not declared in scope
- How does rhs work?
- error: expected unqualified-id before ‘.’ token //(struct)
- Base class undefined
- C++ – Assigning null to a std::string
- gcc: undefined reference to
- “Field has incomplete type” error
- C++ Returning reference to local variable
- How do I flush the cin buffer?
- C++ Return value, reference, const reference
- Making a countdown timer in C++
- G++ undefined reference to class::function
- Is string::compare reliable to determine alphabetical order?
- How to return a struct from a function in C++?
- C++ printing boolean, what is displayed?
- Error : aggregate ‘first one’ has incomplete type and cannot be defined
- Error “Unterminated conditional directive” in cross-referencing headers
- Right Justifying output stream in C++
- Serial Port (RS -232) Connection in C++
- how to destroy an object in C++
- Error in assignment of member in read-only object
- creating an array of structs in c++
- What’s the Use of ‘\r’ escape sequence?
- How do I use an enum value in a switch statement in C++?
- Why should I use a pointer rather than the object itself?
- Call of overloaded function is ambiguous
- ‘cout’ does not name a type
- C++ Cannot call constructor directly in small example
- C++ compiler error c4430 “c++ doesnt support default int”
- Using OpenMP with clang
- Different ways to deallocate an array – c++
- How to determine the version of the C++ standard used by the compiler?
- Declare a bit in C++
- Difference between the int * i and int** i
- Download c++ in existing visual studio 2017
- istream and ostream problem – C++
- List iterator not dereferencable?