olli
I think C++14 is still better choice if you're compiling with gcc, or is 17 fully supported already?
The only Compiler that claims to be fully C++17 compatible is MSVC. Afaik Clang as well as GCC both implemented all language features added by C++ 17. The implementation of the STL are still lacking some features.
Jussi
Yeah I thought so too
Abdul
Hi i want to ask.... if when i'm print out Bonus4, why Bonus2 following print out..
Abdul
this example #include <iostream> using namespace std; int main() { int masa_kerja; int sales; int gaji_pokok; float Bonus1,Bonus2,Bonus3,Bonus4,Bonus5,Bonus6; cout<<"MENENTUKAN BONUS GAJI \n"; cout<<"masukkan masa lama kerja (tahun) :"; cin>>masa_kerja; cout<<"masukkan banyaknnya sales :"; cin>>sales; cout<<"Masukkan gaji pokok anda (Rp) :"; cin>>gaji_pokok; //mulai menghitung Jika masa kerja lebih dr 5th if (masa_kerja>5 && sales>2000){ Bonus1 = gaji_pokok*0.5 ; cout<<"anda mendapat bonus : \n" <<Bonus1; }else if (sales <2001) { Bonus2 = gaji_pokok*0.25; cout<<"anda hanya mendapat bonus : \en" <<Bonus2; }; //Mulai menghitung jika masa kerja antara 5 sampai 1 th if ((masa_kerja<6) && (sales>2000)){ Bonus3 = gaji_pokok*0.35 ; cout<<"Masa kerja anda kurang dari 5Th maka anda mendapatkan bonus : " <<Bonus3; }else if ((masa_kerja<6) && (sales<2001)){ Bonus4 = gaji_pokok*0.15; cout<<"masa Kerja anda <5TH dan sales anda <=2000 maka bonusnya : " <<Bonus4; } }
Anonymous
why we can't use vector <auto>vec;
Anonymous
in c++11
Anonymous
Items in <> are template arguments, not declaration.
Anonymous
u can just use specific data type
Ludovic 'Archivist'
why we can't use vector <auto>vec;
Because "auto" means automatic deduction of the type. Meaning the type of the variable must be deductible from the instruction that creates the variable
Anonymous
lel
Anonymous
why we can't use vector <auto>vec;
d e d u c t i o n g u i d e s C + + 1 7
Anonymous
Thanks admin
Anonymous
My name is Wisnu Wahyudi , age 20years
Anonymous
I need help , just excertion
Anonymous
Anonymous
Anonymous
Anonymous
Holy fuck
Anonymous
Whats wrong in the source ?
Anonymous
I need help , just excertion
Holy shit!😲 No no not here
Dima
wtfff
klimi
H
Dima
you gotta know how to use screen capture tools
klimi
M
Roxifλsz 🇱🇹
Hmmm, also that looks like turbo C++, brb adding rule against turbo C++
Anonymous
i am from indonesian
Anonymous
sorry i dont can language english 😞
Dima
lol 1) TURBO C++ IS PROHIBITED
Dima
Whats wrong in the source ?
your code is ok, but please format it and put braces around if/elses
Anonymous
#include<iostream> #include<stdio.h> #include<conio.h> main() { char jenis[15]; int harga,jumli,kapasitas,total; cout<<"|===================|"<<endl; cout<<"|Flash Disk merek HP|"<<endl; cout<<"|8Gb : Rp.100.000 |"<<endl; cout<<"|16Gb : Rp.150.000 |"<<endl; cout<<"|===================|"<<endl; cout<<"Flash Disk Merek Kingstone"<<endl; cout<<"8Gb : Rp.100.000"<<endl; cout<<"16Gb : Rp.150.000"<<endl; cout<<" "<<endl; cout<<"Masukan Merek Flash Disk : ";cin>>jenis; cout<<"Masukan Kapasitas : ";cin>>kapasitas; cout<<"Masukan Jumlah pesanan : ";cin>>jumli; if (jenis=="HP") if (kapasitas==8) harga=100000; if (kapasitas==16) harga=150000; else if (jenis=="kingstone") if (kapasitas==8) harga=100000; if (kapasitas==16) harga=150000; else cout<<"ANDA SALAH PESAN"<<endl; total=jumli*harga; cout<<"Jadi anda memesan : "<<jenis<<endl; cout<<"harga satuan :Rp. "<<harga<<endl; cout<<"Kapasitas : "<<kapasitas<<endl; cout<<"Total pembayaran anda : Rp. "<<total<<endl; getch(); }
Dima
you can’t compare strings that way
Anonymous
so?
Dima
use std::string to use == operator or use strcmp for c strings
Dima
if (!strcmp(name, “kek”)) - equals
Anonymous
Anonymous
Please fix this code. I 'm very curious to see that walay is just a passing whim
Dima
wtf
Dima
don’t use strcmp for ints
Dima
its only for strings
Dima
strcmp = string compare
Dima
Abdul
how to write if not less than zero i wrote !<0 But its error
Anonymous
its works
Anonymous
If(!(x<0))
Anonymous
Thanks very much
Anonymous
Anonymous
Anonymous
❤️❤️
Anonymous
i know i know
Anonymous
i am now understand
Anonymous
If(!(x<0))
This should work @Aziez13
Dima
use damn screen capture tools
Anonymous
Conio in 2k18!
Ludovic 'Archivist'
Conio in 2k18!
I don't understand why people still use that hella thing
Anonymous
Yep
Ludovic 'Archivist'
I already do not understand why would one use that past C99
Ludovic 'Archivist'
And C99 was almost 20 years ago
Abdul
This should work @Aziez13
Waitt... i want to try
Mubeen
Hi all, I learnt C++ in early 2000s, using those old books from Deitels and Robert Lafore and after graduation never worked with C++. I am sure a lot has changed since then, and with C++11, C++17 many things seems to have gone extinct/become obsolete. Is there any resource (especially latest book) which I should jump into .. instead of using those old resources again?? Many website around have the problem that they mix up the stuff, one can't differentiate what was right 15-20 years ago, is wrong now :(
Ludovic 'Archivist'
I personally updated my knowledge of C++ with this website and I still do
Mubeen
I suggest you to read books from Bjarne Stroustrup
Thanks for the author recommendation! I found that he has 3 books in last 5 years. Which one is recommended (or what is the level of target audience of each book).. 2018 - A Tour of C++ [2nd ed.] 2015 - Programming: Principles and Practice Using C++ [2nd ed.] 2013 - The C++ Programming Language [4 ed.]
Mubeen
Man, all of them. He hella CREATED C++
👍🏻👍🏻 Should I start with Tour of C++ , or with The C++ Programming Language first?
Ludovic 'Archivist'
BinaryByter
Dima
wtf
BinaryByter
we made him into a stickerpack
Dima
he got disappeared?
Dima
(* cough * banned?)
BinaryByter
no
BinaryByter
he's still in OT
Mubeen
Have you already practiced programming with another language?
Yes, Fortran (8 years) and Python 5 years.
Anonymous
5ie 4 h3 u. No f
Roxifλsz 🇱🇹
Shivam
Dot
Joe
hi guys does anyone of you have experience with NETCAT?