Aquib
Usually it's prebundled
olli
sudo apt install g++
yes, works in WSL! pacman -S mingw-w64-x86_64-clang
S.
Cant you just use G++?
I didn’t know there’s https://en.m.wikipedia.org/wiki/DJGPP
Dima
ayyy
Ci-lla
Hi guys I want a prog that print the price less discount If the price is more than 100 the discount is 6% If u pay with cash you’ll get 2% of discount What I make wrong?
Ci-lla
🙏
Anonymous
Check your price first then do something like if(price > 100){discount = 0.06}
MᏫᎻᎯᎷᎷᎬᎠ
This group should be renamed C++ not C/C++
Anonymous
LOL ++
Doston
this line is wrong. int discount = discount + 0.06, if u want only 6 % when the price more than 100 and not paying by bash( cash==false), u should just write int discount=0.06; thats it
Doston
becasue u r not initilizaing discount u will get error on that line
Doston
but the total logic is also bad but still
Ci-lla
Ok 👍 i will try again! Thank you guys
BRAJESH
Notepad ++ is a c and c++ platform please suggest me
Ci-lla
Yeah sorry dima
BRAJESH
Borland c++ download link please provide me
S.
Dima
wtf !
BRAJESH
Dima
S.
Borland c++ download link please provide me
If you cannot even find it by yourself, you are not supposed to use it.
Anonymous
You guys tell me please What does <static_cast mean
MᏫᎻᎯᎷᎷᎬᎠ
Like the ordinary cast But it's better
Anonymous
Like the ordinary cast But it's better
What it used for? i mean i have seen it in some codes but i didn't get why they use it
Francisco
What it used for? i mean i have seen it in some codes but i didn't get why they use it
Some types doesn't implicitly convert to other types, so you must use static_cast
Anonymous
Tnx bro
Anonymous
Like to return double type in to int or what?
Anonymous
Yeah you got what i mean
Anonymous
This code assigns 3 to i , ryt?
Dima
lmao it’s the same
Dima
if you disassembly your code
Anonymous
I got it bro tnx I have a c++ final exam next week 😂😂😂
Anonymous
if you disassembly your code
Was i talking to you?
MᏫᎻᎯᎷᎷᎬᎠ
why is it better?
-More restrictive -Checked in the compile time -More expressive about programmer intent
Anonymous
Anonymous
hello what is the problem??
Dima
hello what is the problem??
what’s your problem?
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
what’s your problem?
it's my problem
Anonymous
Huh!!
He said ""it uses to convert one type to another type ." That's why i asked you that question 😊😊😊
Anonymous
👏👏
Anonymous
hello what is the problem??
#include <iostream> #include <conio.h> using namespace std; void main() {   clrscr(); // clears screen     inta[100],n,i,beg,end,mid,item;     cout<<"Enter No. of Elements= ";     cin>>n;     cout<<"\nEnter Elements in Sorted Order=\n";     for(i=1;i<=n;i++)     {         cin>>a[i];     }     cout<<"\nEnter Item you want to Search= ";     cin>>item;     beg=1;     end=n;     mid=(beg+end)/2;                       // Find Mid Location of Array     while(beg<=end && a[mid]!=item)      // Compare Item and Value of Mid     {         if(a[mid]<item)             beg=mid+1;         else             end=mid-1;         mid=(beg+end)/2;     }     if(a[mid]==item)     {         cout<<"\nData is Found at Location : "<<mid;     }     else     {         cout<<"Data is Not Found";     }   getch();  // wait for input }
Dima
please format the codeh
Anonymous
#include <iostream> #include <conio.h> using namespace std; void main() {   clrscr(); // clears screen     inta[100],n,i,beg,end,mid,item;     cout<<"Enter No. of Elements= ";     cin>>n;     cout<<"\nEnter Elements in Sorted Order=\n";     for(i=1;i<=n;i++)     {         cin>>a[i];     }     cout<<"\nEnter Item you want to Search= ";     cin>>item;     beg=1;     end=n;     mid=(beg+end)/2;                       // Find Mid Location of Array     while(beg<=end && a[mid]!=item)      // Compare Item and Value of Mid     {         if(a[mid]<item)             beg=mid+1;         else             end=mid-1;         mid=(beg+end)/2;     }     if(a[mid]==item)     {         cout<<"\nData is Found at Location : "<<mid;     }     else     {         cout<<"Data is Not Found";     }   getch();  // wait for input }
Anonymous
Anonymous
Remove clrscr();
Anonymous
Make space between int and a then debug it
Dima
> CONIO
Dima
do you want a ban?
Dima
oh that’s not a rule yet
Dima
it will be soon
Anonymous
Make space between int and a then debug it
tnx😍 but cna u explain it😬🙏
Dima
looooooooool
Anonymous
i am dying XD
Anonymous
you guys here are savages
Dima
this xD
ANAS ⁷𓅓
Hello guys
Dima
welcome
BinaryByter
#include <iostream> #include <conio.h> using namespace std; void main() {   clrscr(); // clears screen     inta[100],n,i,beg,end,mid,item;     cout<<"Enter No. of Elements= ";     cin>>n;     cout<<"\nEnter Elements in Sorted Order=\n";     for(i=1;i<=n;i++)     {         cin>>a[i];     }     cout<<"\nEnter Item you want to Search= ";     cin>>item;     beg=1;     end=n;     mid=(beg+end)/2;                       // Find Mid Location of Array     while(beg<=end && a[mid]!=item)      // Compare Item and Value of Mid     {         if(a[mid]<item)             beg=mid+1;         else             end=mid-1;         mid=(beg+end)/2;     }     if(a[mid]==item)     {         cout<<"\nData is Found at Location : "<<mid;     }     else     {         cout<<"Data is Not Found";     }   getch();  // wait for input }
/ban conio
BinaryByter
idc anymore
BinaryByter
I cant see this shit any longer
BinaryByter
oh that’s not a rule yet
I DONT FUCKING CARE
BinaryByter
you guys here are savages
Lets say that you need to either have a thick skin or good code in order to feel welcome here ^^
BinaryByter
#WARN: Chat: C/C++ Admin: Dima User: Marvel User ID: 556944046 Reason: spam more and you’ll archieve more