Faizan
I'll do that later but right now i have to pass it somehow
Faizan
If any one wants to help for humanity sake . Most welcome
Robot
Is vs code the best IDE for C++?
Z
Is vs code the best IDE for C++?
U wont need vscode on linux
Robot
It is difficult to use VS Code on Mac OS
Palinuro
Is vs code the best IDE for C++?
i am a big vscodium lover (open source binary distribution of vscode), but in my experience the best cpp ide was qtcreator so far
Robot
Vs code is full stack IDE for all languages
Igor🇺🇦
Is vs code the best IDE for C++?
VSCode is not and IDE. It's a text editor
Anonymous
b^2 this is not a error , i mean after replacing b^2 by b*b , this code is not working.
Well you are wrong and I don't feel like looking at your code now
Palinuro
VSCode is not and IDE. It's a text editor
i think that since the creation of atom, the family of advanced code editors are more similar to ides than to text editors
Palinuro
saying that pluma, gedit or eric are ides is a huge mistake. but i don't think it would be the same with atom or vscodium, since they have advanced features that not even mainstream ides have
Palinuro
including assisted build and debugging in several languages
Igor🇺🇦
i think that since the creation of atom, the family of advanced code editors are more similar to ides than to text editors
It doesn't come with compiler, debugger or even support C++ out of the box. It's not an IDE. Try something like Visual Studio or Clion to see the difference
Palinuro
It doesn't come with compiler, debugger or even support C++ out of the box. It's not an IDE. Try something like Visual Studio or Clion to see the difference
i perfectly know that difference, but once you install the language toolkit you need, such advanced editors know how to use it to inspect, build, debug and even profile, or can guide you through installing the missing components
Ayush
#include<iostream> #include<math.h> using namespace std; int main(){ int a, b, c; float D, alpha, beta; cout<<"Enter the value of a, b and c of Eq. ax^2+bx+c"<<endl; cin>>a>>b>>c; D = b^2 - 4*a*c; alpha = ( -b + sqrt(D))/(2*a); beta = ( -b - sqrt(D))/(2*a); if (D>0) { cout<<"distinct roots of equation are "<<endl; cout<<alpha<<beta<<endl; } if (D=0) { alpha = -b/(2.0*a); cout<<"Equal roots are "<< alpha <<endl; } if(D<0) { cout<<"No real root"; } return 0; }
Palinuro
It doesn't come with compiler, debugger or even support C++ out of the box. It's not an IDE. Try something like Visual Studio or Clion to see the difference
call them universal lightweight language-agnostic lesser-ide if you want (ULLALI is ugly as hell) but we really need to give them a different name to not confuse them with standard text editors
Palinuro
we need a new buzz word for them lol
Igor🇺🇦
i perfectly know that difference, but once you install the language toolkit you need, such advanced editors know how to use it to inspect, build, debug and even profile, or can guide you through installing the missing components
If you know the difference there is no reason to call Vscode and ide. It's not. I can build something that can parse C++ with VIM too. IDE is Integrated development environment. Vscode is missing this part
Ayush
So why did you post it here?
why this is not working 😔
Anonymous
why this is not working 😔
Because you've written so
Anonymous
means??🙄
Means that the problem is in your code
Anonymous
Fix it
Ayush
but i don't know... that's why i posted here.... maybe someone help me🙄.
Igor🇺🇦
call them universal lightweight language-agnostic lesser-ide if you want (ULLALI is ugly as hell) but we really need to give them a different name to not confuse them with standard text editors
It's called. https://en.wikipedia.org/wiki/Source-code_editor. No need to reinvent the wheel That's how Microsoft themselves call it https://code.visualstudio.com/
Igor🇺🇦
What kind of question is this? 🤦‍♂️
Anonymous
#ot
sk
/cpp-vscode
Harsh
Harsh
/notes
sk
#cpp-vscode
sk
Use #
Thanks buddy
Harsh
Mahsun
Awesome Modern C++ https://awesomecpp.com/
Mahsun
Faizan
Anyone know about C graphics?
Anonymous
Thanks
The
I need c and c++ books Could anyone provide me
Tangent Alpha
.
klimi
Hmmmm I smell an advert
The
Library
Sorryy I didn't get u
klimi
@unterumarmung
klimi
Sorryy I didn't get u
Go to library and borrow a book
The
@unterumarmung
This message was deleted
klimi
Which library
Which ever is closest to you or has the books you want to borrow
klimi
This message was deleted
Thats good :))) very good
John
Hey friends
John
Which is The best compiler for c++ using a smartphone 🤔
klimi
GCC/clang in Termux
(You can run them without termux if you want....)
klimi
How?
Android is Linux distro, termux uses that just gives you package manager ¯\_ (ツ) _/¯
Anonymous
How can I redirect LPCWSTR of a specific extension in windows in a list to write to a text file? I have tried ofstream but it writes garbage to text file after creating it. std::ofstream file; file.open("test.txt", std::ios::out | std::ios::app | std::ios::binary); std::list<CString> listFiles; FindFiles(_T("D:\\"), _T(".txt"), listFiles); for (const auto& strFile : listFiles) file << strFile.GetString() << std::endl; return 0; Output in txt file: 00000281BBACF338 00000281BBACEA78 00000281BBACF108 00000281BBAD1E48 00000281BBAD3D38 00000281BBAD3248 00000281BBAD22F8 00000281BBAD20C8 00000281BBAD38D8 00000281BBAD3B08 00000281BBAD3018 00000281BBAD2758 00000281BBAD2988 00000281BBAD2BB8 00000281BBAD2DE8 00000281BBAD5C98 00000281BBAD4D48 00000281BBAD6558 00000281BBAD51A8 00000281BBAD53D8 00000281BBAD5608 00000281BBAD5A68 00000281BBAD5EC8 00000281BBAD6E18 00000281BBAD60F8 00000281BBAD5838 00000281BBAD6328 00000281BBAD6BE8 00000281BBAD7B38 00000281BBAD6788 00000281BBAD69B8 00000281BBAD74A8 00000281BBAD7048
Anonymous
I have used FindFiles and FindFirstFile API
klimi
there exist terminal emulator tho....
Faizan
Can anyone please help me with graphics. I'll be very thankful to hin
Igor🇺🇦
I used #Define cout wcout
Why? There is std::cout already defined in C++. I don't know what's used in this case.
سجاد
Hi
سجاد
How can I have ordered output from this code?
سجاد
#include<iostream> #include<math.h> using namespace std; bool is_prime(int num) { for (int i= 2; i <= sqrt(num); i++) { if (num % i == 0) { return false; } } return true; } int main(int argc, char *argv[]) { int f=0; int t=0; int c=0; int a[1000][6]; int e=0; for(int j=0;j<=100;j++) a[j][1]=(18*j)+1; for(int j=0;j<=100;j++) a[j][2]=(18*j)+11; for(int j=0;j<=100;j++) a[j][3]=(18*j)+31; for(int j=0;j<=100;j++) a[j][4]=(18*j)+41; for(int j=0;j<=100;j++) a[j][5]=(18*j)+61; for(int j=0;j<=100;j++) a[j][6]=(18*j)+71; for(int j=0;j<=100;j++) { // cout<<a[j][1]<<" "<<a[j][2]<<" "<<a[j][3]<<" "<<a[j][4]<<" "<<a[j][5]<<" "<<a[j][6]<<endl; if(!(is_prime(a[j][1]))) a[j][1]=0; if(!(is_prime(a[j][2]))) a[j][2]=0; if(!(is_prime(a[j][3]))) a[j][3]=0; if(!(is_prime(a[j][4]))) a[j][4]=0; if(!(is_prime(a[j][5]))) a[j][5]=0; if(!(is_prime(a[j][6]))) a[j][6]=0; } for(int j=1;j<=100;j++) { cout<<a[j][1]<<" "<<a[j][2]<<" "<<a[j][3]<<" "<<a[j][4]<<" "<<a[j][5]<<" "<<a[j][6]<<endl; { if(a[j][1]==0) cout<<" "; else cout<<a[j][1]<<" "; } { if(a[j][2]==0) cout<<" "; else cout<<a[j][2]<<" "; } { if(a[j][3]==0) cout<<" "; else cout<<a[j][3]<<" "; } { if(a[j][4]==0) cout<<" "; else cout<<a[j][4]<<" "; } { if(a[j][5]==0) cout<<" "; else cout<<a[j][5]<<" "; } { if(a[j][6]==0) cout<<" "; else cout<<a[j][6]<<endl; } } }
Igor🇺🇦
#include<iostream> #include<math.h> using namespace std; bool is_prime(int num) { for (int i= 2; i <= sqrt(num); i++) { if (num % i == 0) { return false; } } return true; } int main(int argc, char *argv[]) { int f=0; int t=0; int c=0; int a[1000][6]; int e=0; for(int j=0;j<=100;j++) a[j][1]=(18*j)+1; for(int j=0;j<=100;j++) a[j][2]=(18*j)+11; for(int j=0;j<=100;j++) a[j][3]=(18*j)+31; for(int j=0;j<=100;j++) a[j][4]=(18*j)+41; for(int j=0;j<=100;j++) a[j][5]=(18*j)+61; for(int j=0;j<=100;j++) a[j][6]=(18*j)+71; for(int j=0;j<=100;j++) { // cout<<a[j][1]<<" "<<a[j][2]<<" "<<a[j][3]<<" "<<a[j][4]<<" "<<a[j][5]<<" "<<a[j][6]<<endl; if(!(is_prime(a[j][1]))) a[j][1]=0; if(!(is_prime(a[j][2]))) a[j][2]=0; if(!(is_prime(a[j][3]))) a[j][3]=0; if(!(is_prime(a[j][4]))) a[j][4]=0; if(!(is_prime(a[j][5]))) a[j][5]=0; if(!(is_prime(a[j][6]))) a[j][6]=0; } for(int j=1;j<=100;j++) { cout<<a[j][1]<<" "<<a[j][2]<<" "<<a[j][3]<<" "<<a[j][4]<<" "<<a[j][5]<<" "<<a[j][6]<<endl; { if(a[j][1]==0) cout<<" "; else cout<<a[j][1]<<" "; } { if(a[j][2]==0) cout<<" "; else cout<<a[j][2]<<" "; } { if(a[j][3]==0) cout<<" "; else cout<<a[j][3]<<" "; } { if(a[j][4]==0) cout<<" "; else cout<<a[j][4]<<" "; } { if(a[j][5]==0) cout<<" "; else cout<<a[j][5]<<" "; } { if(a[j][6]==0) cout<<" "; else cout<<a[j][6]<<endl; } } }
Can't you use std::sort?
mov $22, %rax
https://paste.debian.net/1178106/ Can you tell me why this function only works for small buffers (<= 25 bytes)? It appends a buffer to the end of a file The output of the debugger is: https://paste.debian.net/1178103 The problem is in the last 7 lines... it fails to open the file
Anonymous
#include<iostream> #include<math.h> using namespace std; bool is_prime(int num) { for (int i= 2; i <= sqrt(num); i++) { if (num % i == 0) { return false; } } return true; } int main(int argc, char *argv[]) { int f=0; int t=0; int c=0; int a[1000][6]; int e=0; for(int j=0;j<=100;j++) a[j][1]=(18*j)+1; for(int j=0;j<=100;j++) a[j][2]=(18*j)+11; for(int j=0;j<=100;j++) a[j][3]=(18*j)+31; for(int j=0;j<=100;j++) a[j][4]=(18*j)+41; for(int j=0;j<=100;j++) a[j][5]=(18*j)+61; for(int j=0;j<=100;j++) a[j][6]=(18*j)+71; for(int j=0;j<=100;j++) { // cout<<a[j][1]<<" "<<a[j][2]<<" "<<a[j][3]<<" "<<a[j][4]<<" "<<a[j][5]<<" "<<a[j][6]<<endl; if(!(is_prime(a[j][1]))) a[j][1]=0; if(!(is_prime(a[j][2]))) a[j][2]=0; if(!(is_prime(a[j][3]))) a[j][3]=0; if(!(is_prime(a[j][4]))) a[j][4]=0; if(!(is_prime(a[j][5]))) a[j][5]=0; if(!(is_prime(a[j][6]))) a[j][6]=0; } for(int j=1;j<=100;j++) { cout<<a[j][1]<<" "<<a[j][2]<<" "<<a[j][3]<<" "<<a[j][4]<<" "<<a[j][5]<<" "<<a[j][6]<<endl; { if(a[j][1]==0) cout<<" "; else cout<<a[j][1]<<" "; } { if(a[j][2]==0) cout<<" "; else cout<<a[j][2]<<" "; } { if(a[j][3]==0) cout<<" "; else cout<<a[j][3]<<" "; } { if(a[j][4]==0) cout<<" "; else cout<<a[j][4]<<" "; } { if(a[j][5]==0) cout<<" "; else cout<<a[j][5]<<" "; } { if(a[j][6]==0) cout<<" "; else cout<<a[j][6]<<endl; } } }
Was this pre-switch statements?
olli
https://pastebin.com/HGJj9EK6 full code.
for wchar_t* you should use std::wofstream
mahdi13
for this : S = 1/(1*2) + 1/(2*3) + 1/(3*4) + ... + 1/(n * n+1) is this correct : #include <iostream> #include <stdio.h> using namespace std; int main(){ int a=1, b=2, sum, n; cin >> n; for(int i=0; i<n; i++){ sum += 1/(a*b); a++; b++; } cout << sum; }
MilkBeforeCereal
you'll get sum as 0 probably