Rahul
I corrected addition statement...it should be n1+n2...but still my code is giving wrong output .
itsmanjeet
getting Invalid operations entered ??
Rahul
itsmanjeet
scanf should be %c i guess
Rahul
When i took %c it directly terminated the program
Harshi
Hi dude
Rahul
SHAAN
hi
Rahul
When i took %c... the program is directly terminated
Harshi
Check the loop condition properly
SHAAN
do you guys know how to set up visual studio code for c++
Harshi
Search for popular c and c++ extension for vs code in google you will find the proper extension
Harshi
You can also use switch statements
Rahul
Yeah i worked...thank you
SHAAN
/get cppbookguide
Rahul
/get
Rahul
Yeah i will keep in mind...thank you
Rahul
Nah the question was only for this 3 operators
Rahul
Yes i understood...i will not repeat it again
Anonymous
nvm
Rahul
oh
Is their a function called fflush(stdin). My friend suggested me to use after scanf()
Anonymous
Anonymous
it's in MSVC, but it's not a standard C function
No it's undefined behavior to call fflush on an input stream
Anonymous
no
Yes it is
Anonymous
Yes it is
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fflush?view=vs-2019 If the stream was opened in read mode, or if the stream has no buffer, the call to fflush has no effect, and any buffer is retained. A call to fflush negates the effect of any prior call to ungetc for the stream. The stream remains open after the call.
Anonymous
If stream points to an output stream or an update stream in which the most recent operation was not input, the fflush function causes any unwritten data for that stream to be delivered to the host environment to be written to the file; otherwise, the behavior is undefined.
Anonymous
C11 7.21.5.2
Anonymous
Anonymous
BTW some people also leave a space before the format specifier in scanf
Anonymous
🤷
Anonymous
What the fuck
Nameful
/report advertising?
Nameful
(also, their first message here)
Nameful
oh
Yash
Nameful is hurtful and it rhymes wow
Yash
Talk about meant to be
Nameful
Nameful is hurtful and it rhymes wow
oh, I hurt your feelings? :(
Yash
Nah just kidding bro!
Nameful
Look at the message he replied to
Nameful
It's a bit of a weird thing to do
Nameful
I don't see how it would help him
Anonymous
It's very bad code
Nameful
oh, interesting
Anonymous
Like VERY
Nameful
but yeah, I think this could be resolved without using the preprocessor
Nameful
you're changing how built-in language features work
Anonymous
If you are not an expert, you shouldn't use preprocessor except include and include guards
Anonymous
In most cases
Anonymous
How about LCD gcd
Anonymous
#include <iostream> int main () { std: : cout <<"hi men "; return 0; }
Anonymous
it's not work
Anonymous
what is the problem
Nameful
what is the problem
could it be the spaces in std::cout?
Nameful
does it compile for you?
Nameful
no
try adding << std::endl
Nameful
after "hi men "
Anonymous
Sasuke
If someone created a Emulator help me out. Problem- https://www.reddit.com/r/EmuDev/comments/gtb400/testing_my_emulator_and_found_these_differences/
Ioioio
How to find ip address in c?
Hermann
How to find ip address in c?
https://www.google.com/amp/s/www.geeksforgeeks.org/c-program-display-hostname-ip-address/amp/
Dima
don’t you post your ad
Ioioio
Ipv4
Anmol
Hey so I have a class definition like https://del.dog/hitodokuba
Anmol
Now I'm trying to define this remove function outside the class using scope resolution operator but whenever I try to access the Node struct in template, it gives me an error
Anmol
The error says undeclared use of identifier Node. So I tried access this Node using scope resolution too but that didn't work either
Anmol
This is my .h file https://del.dog/narfininag
Anmol
This is what I'm trying to do in my .cpp file https://del.dog/eppyckingy