python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Does swap() function works in iostream header?
#include <iostream>
using namespace std;
int main(){
swap(a[i],a[j])
}
In this the swap function work automatically or I need to create a another swap function to solve this?
Rio_t
Votes: 0
Answers: 1
C++ Checking if a string that is representing a date is 7 or more days before today date
I have a date stored as a string with the format %d.%m.%y, for example, "08.01.2022" and I want to check if at least 7 days have past since that day in C++.
I attempted using this method:
#...
Mikey
Votes: 0
Answers: 1
std::cin , unwanted behaviour. and how can I fix this?
I tried to play with some code to test overloading functions. The overloading part went well, however, I learned something about std::cin that made me feel stupid for not noticing it before!
#include ...
med amine riahi
Votes: 0
Answers: 1
std::osyncstream outputs garbled text and causes seg fault
This code when using osyncstream outputs garbage characters, isn't alway in sync, and seg faults. When output is to std::cout directly the output isn't in sync but output is good and does not seg faul...
rm1948
Votes: 0
Answers: 1