MRT
querySyntax << "select device_code from User_profilehandshake"; not working and PQresultStatus return data with int 7
MRT
i think problem most be from streamstring
Divyanshi
Does anyone have coding blocks' algo++ and competitive programming course?
Anonymous
They both work 👍
It doesn't mean it's correct
Anonymous
There's no iostream.h in C++. It's only in your compiler.
Anonymous
Because they have updated it
Updated it for what, lol?
Anonymous
Guy they are both correct If you started learning c++ Back in the early 1900s you will understand what am saying
Anonymous
Like in pythons2 Print "hello world " Now pythons 3 Print ("hello world ") Do you understand What I mean by update
Anonymous
Guy they are both correct If you started learning c++ Back in the early 1900s you will understand what am saying
Ok, if it's correct, please tell me what C++ Standard paragraph describes it
Anonymous
iostream.h is deprecated—it is the original Stroustrup version. iostream is the version from the standards committee. Generally, compilers point them both to the same thing, but some older compilers won't have the older one. In some odd cases, they will both exist and be different (to support legacy code) and you then must be specific.
Anonymous
I don't get
What don't you get?
Anonymous
What don't you get?
C++ Standard paragraphs What does it mean 😳
Anonymous
When did you start learning c++ ??🙈
Anonymous
C++ Standard paragraphs What does it mean 😳
What word exactly you don't understand lol?
Anonymous
Harry
Because they have updated it
Yes. I remember using iostream.h back when I were in 6th div Now, iostream is generally used undoubtedly
Anonymous
Using features that aren't in the standard is considered bad practice
👍 finally I am learning c++ with old books My bad😄😅
Ishank
#cbookguide
[BLĀNK]
Just pick a compiler and start working on it😂👍
[BLĀNK]
There so many compiler variations out there , its common for people to get confused
[BLĀNK]
So just pick one, work on it and forget that the code existed 😬😏
[BLĀNK]
Anonymous
#cppbookguide
Thanks dude
Pavel
There so many compiler variations out there , its common for people to get confused
There are around 4 c++ major compilers (gcc, clang, icc, msvc) You would need to spend hundreds of millions to make an optimized c++20 compiler
[BLĀNK]
So be happy with one
[BLĀNK]
Tough life... programmers got here😂
Pavel
I would not say 4 is "too many". It's only 3 if we exclude Windows. And just 2 of them if we are talking about open source
Pavel
2 compilers actually help to avoid some silly mistakes
Nameful
Intel's compiler?
Pavel
Is intel compiler still widely used? Ok I see it supports C++17 features then probably it is used https://en.cppreference.com/w/cpp/compiler_support
Asad
Why would anyone use Intel Compiler? Just give one valid reason, please.
Pavel
Why would anyone use Intel Compiler? Just give one valid reason, please.
In the past I heard that it is "the fastest compiler", I mean that it generates the most efficient code. Not sure how much it was true even then.
Diego
In the past I heard that it is "the fastest compiler", I mean that it generates the most efficient code. Not sure how much it was true even then.
I'm not really in the know about C compilers, but I'd think GCC, being around for so long and having such a wide community maintaining it, would be the fastest, no?
Asad
Diego
Then again Intel does have a shitload of money and is one of the big processor manufacturers
Igor🇺🇦
I'm not really in the know about C compilers, but I'd think GCC, being around for so long and having such a wide community maintaining it, would be the fastest, no?
Phoronix posts periodically benchmarks of different compilers on Linux mostly . https://www.phoronix.com/scan.php?page=article&item=gcc-clang-2019&num=1 As always, the answer to the question which compiler produces the fastest code is "it depends"
Pavel
Oh, by the way. Do you know the name of a tool for benchmarking changes that reduce effect of memory layout to the results? I remember a presentation where the authors were talking about effects of memory layout to benchmarking and about this tool, but now can't remember the name of it or find the presentation.
Igor🇺🇦
Yes, this is the one, thanks! :)
This is the profiler they talk about in the talk. I've never tried it so don't know how effective it is https://github.com/plasma-umass/coz
Pavel
This is the profiler they talk about in the talk. I've never tried it so don't know how effective it is https://github.com/plasma-umass/coz
Actually my problem was, I was trying to find Coz (I remembered that it was 3 letter name), when what I needed was Stabilizer :) https://github.com/ccurtsinger/stabilizer
Anonymous
Hello guys, is there anyway cin can extract input into enum type variables?
Igor🇺🇦
Hello guys, is there anyway cin can extract input into enum type variables?
https://www.daniweb.com/programming/software-development/threads/22861/c-help-with-enum-and-cin/amp
Igor🇺🇦
Another not so long method
cin and enums did not change since this answers . You still need to cast from int to your enum. What's long in this method? You can cast manually every time.
Anonymous
Why would anyone use Intel Compiler? Just give one valid reason, please.
Because I think Intel knows best how to compile for their CPUs :)
س💕 ⚖️
#include <stdio.h> #include <stdlib.h> int main() { int counter = 1 ; int number ; printf("enter a number\n"); scanf("%d",&number); while(counter<=2){ if(number==0){ break;} if (number ==100){ continue; } else{ printf("the number is %d ",number);} printf("\n enter a number\n"); scanf("%d",&number); counter++; } }
س💕 ⚖️
Why stops the program when I press the number 100
س💕 ⚖️
I want to ignore the number does not stop
س💕 ⚖️
How do I get him to just ignore him
⚛ Hz
the problem is
⚛ Hz
your continue does not allow user enter next number
⚛ Hz
once the number == 100, the scanf is got skipped
⚛ Hz
and will be skipped in next time, because the number is keep 100 in next loop, so scanf got skipped too
⚛ Hz
infinite loop!
⚛ Hz
you need rearrange your statement, put scanf before if to break the infinite loop
س💕 ⚖️
Really, thank you very much. I did not expect it so easily
⚛ Hz
I didn’t look carefully before and was misled by the counter variable)
Anonymous
http://eel.is/c++draft/library.c
Anonymous
iostream.h is not
Anonymous
Anonymous
Now it is
Why would it be?😂
Anonymous
Why would it be?😂
New way but old method 😏