if (quotation == "yes")
// open a file in write mode.
ofstream outfile;
You need braces around the if
block
if (quotation == "yes")
{
// open a file in write mode.
ofstream outfile;
...
}
More Related Contents:
- What’s the difference between 'gcc -g' and 'gcc -g3'?
- Parallel one dimensional array
- Why is list initialization (using curly braces) better than the alternatives?
- Recommended way to initialize srand?
- Why does const imply internal linkage in C++, when it doesn’t in C?
- For every character in string
- Best C++ IDE or Editor for Windows
- static constructors in C++? I need to initialize private static objects
- How do I remove an item from a stl vector with a certain value?
- Should I return const objects?
- Why did Microsoft abandon long double data type? [closed]
- Stack overflow caused by recursive function
- How to check what shared libraries are loaded at run time for a given process?
- Why no variable size array in stack?
- How to get the cpu usage per thread on windows (win32)
- Class template argument deduction not working with alias template
- Where do I find the definition of size_t?
- Error: variable “cannot be implicitly captured because no default capture mode has been specified”
- Set back default floating point print precision in C++
- Why does this code with ‘1234’ compile in C++?
- difference between global operator and member operator
- trying to use imread() and imshow() raises OpenCV Error: Assertion failed (size.width>0 && size.height>0)
- When do extra parentheses have an effect, other than on operator precedence?
- “Symbol(s) not found for architecture x86_64” on QtCreator project
- dynamically allocated memory after program termination
- What does this C code do [Duff’s device]? [duplicate]
- rc.exe no longer found in VS 2015 Command Prompt
- Is there anyway to write the following as a C++ macro?
- Multiple “could not be resolved” problems using Eclipse with minGW
- How to get the path of an active file explorer window in c++ winapi