Comments (1)
Consider tie(). Multiple value returns should return a tuple. Move tie() to an example as an alternative and mention the weakness wrt uninitialized variables.
from cppcoreguidelines.
Related Issues (20)
- C.21 Exception for copy-and-swap idiom HOT 4
- Broken links HOT 3
- F.20 should exclude swap HOT 3
- SF.2 allow inline variables and static inline class member variables HOT 1
- F.16 (pass by reference to const / by value): Request for clarification HOT 6
- Poor (and nearly-incorrect) example for rule F.27 (shared_ptr) HOT 4
- Challenging C.153 "Prefer virtual function to casting" HOT 4
- ES.56 Clarification on moving when assigning to reference outside of scope HOT 3
- F.16 Allow pass-by-value for types that are copied HOT 2
- `gsl::suppress` issues collected: Strings, literals, cases HOT 2
- Hi
- New NL Rule suggestion: Place comment-only lines before the code they apply to HOT 1
- Should/can Expects and Ensures be macros?
- Check for invalidated iterator/dangling reference on heap reallocation HOT 2
- Turning off clang unsafe buffer warnings fails when compiling with a gcc based compiler HOT 2
- CodSoft Internship Task 2 /TASK 2 SIMOPLE CALCULATOR #include <iostream> using namespace std; int main() { double num1, num2; char operation; // Input cout << "Enter first number: "; cin >> num1; cout << "Enter second number: "; cin >> num2; cout << "Enter operation (+, -, *, /): "; cin >> operation; // Calculation and output switch (operation) { case '+': cout << "Result: " << num1 + num2; break; case '-': cout << "Result: " << num1 - num2; break; case '*': cout << "Result: " << num1 * num2; break; case '/': if (num2 != 0) cout << "Result: " << num1 / num2; else cout << "Error! Division by zero."; break; default: cout << "Invalid operation!"; } return 0; } HOT 2
- Cpp programs HOT 3
- C.30: Define a destructor if a class needs an explicit action at object destruction - note HOT 1
- Sss
- Practice HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppcoreguidelines.