Пожилой Христос
How I can create textbox with SFML?
Eirik
Favorite IDE for C?
Пожилой Христос
Favorite IDE for C?
Visual studio
Пожилой Христос
🤮
Why?
Anonymous
👍
Eirik
Why?
VS is literally bigger than most of my entire operating systems, and for no discernible reason. I dont think it even works with C either, just their version of C++
Anonymous
Please how do I install mingw for vscode.
J
My workflow(if I use android) termux -> To access linux kernel and pkg in Linux termux-api -> To access filesystem ACode editor -> To write C/C++ code
'''''''
Please how do I install mingw for vscode.
"Get Started with C++ and Mingw-w64 in Visual Studio Code" https://code.visualstudio.com/docs/cpp/config-mingw
'''''''
Google atleast once before asking questions 🤦‍♂
Anonymous
Armin
I prefer qt
You mean qt creator?
Anonymous
Yes qt creator
Anonymous
Multiplatform and powerful
Ludovic 'Archivist'
I didn't want to use CLion but one day I used it and have been using it ever since
Eirik
Ive been eyeing CodeLite
D
Hello everyone, i would appreciate if someone could help me. Im trying to make a simple calculator. 3 options first is when chosing (G) asks the user two numbers . the second is (A) addition , and third is (S) subtraction. How can i make that if i choose letter (A) for the first time without chosing the (G) option to not display 0 but a mesage of chosing first letter (G) ; im using a switch. I would appreciate any suggestion.
Anonymous
I didn't want to use CLion but one day I used it and have been using it ever since
Same here. With the rust and toml plugin for CLion, i just can't seem to figure out how I was coding without CLion before. As much as I loved vim, I have now come to avoid it like a plague in cases where I can.
D
Thanks! I'll try it.
Anonymous
Hi guys, I am bad at loops and logical things how to improve
Anonymous
Practice problems
How to practice 😥 even I forget it very early
100$ website
Hi guys, I am bad at loops and logical things how to improve
Same happened with me, first learn loop syntax 10 time untill and unless u can remember it later start solving small problems, get a clear idea about how loop works and what happens when u run a loop, why you need them and move with another problems give it more time, its not a topic of one two days for hard learners like us. also its an important topic
Ethan
How to practice 😥 even I forget it very early
Go to leetcode, there are solutions in the comments
Ilia
Hi all. I want to understand. We have int and long int. I have a 64bit oc. I was expected that long int would be 64 bits but it is 32. In other words int and long int are same. What do I miss?
Ilia
https://en.cppreference.com/w/cpp/language/types
Thanks I have red them but there is not answer for my question. I understand differences. I cant understand why long int uses 32bit storage on 64bit oc
Ilia
What is oc?
Sorry os
Ilia
Are you sure you are compiling it for 64bit?
lol nope. Thanks i will investigate it)
100$ website
You don't need to learn syntax, you can always google that.
Agreed!! however if you know syntax well, you will spend more time solving the problem and understanding the logic. So for very beginers and hard learners, first understanding and learning any one language's syntax is best practice
.....
Hello can somebody help me with c++ boolean?
Artur
Boolean is quite serious !
Anonymous
Hi all. I want to understand. We have int and long int. I have a 64bit oc. I was expected that long int would be 64 bits but it is 32. In other words int and long int are same. What do I miss?
It depends on your architecture's data model. If your architecture is LP64, ILP64 or SILP64 then long int will be 64 bits wide. If on the other hand it is LLP64, long int will be 32 bits wide.
Harleen
I have a map of objects having maps. I want to iterate until the lowest part but I am doing somtehing wrong. Can someone help me out?
Harleen
https://pastebin.com/h5miPt2R
Harleen
Here is pastebin of what I have done
Artur
I am trying to compile gcc 11.2 for raspberry pi (building an image) using rocker. Received an error: Checking wether we are crosscompiling... configure: error in ‘/arm-Linux-gnueabihf/libgomp’ Configure error: cannot run c compiled programms. If you mean to cross compile, use ‘—host’ I did set up host — for configuring —host=arm-linux-gnueabihf And suggestions ?
Artur
Building an image using docker*
Artur
Any suggestions*
Artur
Full command looks as follows
Artur
# Install GCC-11.2 & G++11.2 # Configure and build (this task can take at least 5 hours on i9-10850k) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RUN cd ~ && \     wget https://ftpmirror.gnu.org/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz && \     tar xf gcc-11.2.0.tar.gz && \     # export PATH=/path/to/gcc-4.9.2/bin/:$PATH && \     # export LD_LIBRARY_PATH=/path/to/gcc-4.9.2/lib64/:$LD_LIBRARY_PATH && \     export CPATH=/usr/local/include && export LIBRARY_PATH=/usr/local/lib && export LD_LIBRARY_PATH=/usr/local/lib && export LD_RUN_PATH=/usr/local/lib && \     . /root/.bashrc && \     cd gcc-11.2.0/ && ./contrib/download_prerequisites && \     cd ~ && mkdir build && cd build && \     ../gcc-11.2.0/configure --host=arm-linux-gnueabihf -v --enable-languages=c,c++ --prefix=/usr/local/gcc-11.2.0 --program-suffix=-11.2.0 --with-arch=armv7 --with-fpu=vfp --with-float=hard --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf && \     make -j12 && \     sudo make install-strip && \     sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-11.2.0/bin/gcc-11.2.0 20 --slave /usr/bin/g++ g++ /usr/local/gcc-11.2.0/bin/g++-11.2.0
Artur
I did try different —host setting but it doesn’t seem to change anything
Amrith
Do you have cross compilation libraries required?
Artur
Yep I did install qemu locally on my machine
Artur
Regarding build I have no clue 😅 that’s why I am here but I did try it, the same error appeared
Hasem
Hello i need assit for my data &structres assigment in C . is there anybody whi want to help me ?
vlad
I installed Visual Studio for C ++ but I'm programming in C language, did I do it right?
\Device\NUL
C and C++ has different behaviour
vlad
thanks
Anonymous
Thanks .
Anonymous
Hello , good to see active group .
Anonymous
I'm learning C , who's fresh we can have pair programming .
Azhar
How can i convert this to friend function? abc operator+(abc ob,abc o2) { abc t; t.x = o2.x+ob.x; t.y = o2.y+ob.y; t.z = o2.z+ob.z; return t; }
Leovan
Why can't I use a class attribute as the default value for its method? For example: class A { .... void method(int a = x); private: int x; };
Leovan
How can i convert this to friend function? abc operator+(abc ob,abc o2) { abc t; t.x = o2.x+ob.x; t.y = o2.y+ob.y; t.z = o2.z+ob.z; return t; }
class abc { friend abc operator+(const abc & ob1, const abc & o2); public: abc(int x = 0, int y = 0, int z = 0) : x(x), y(y), z(z) {} private: int x; int y; int z; }; abc operator+(const abc & ob, const abc & o2) { abc t; t.x = o2.x+ob.x; t.y = o2.y+ob.y; t.z = o2.z+ob.z; return t; }
Hello, I am writing a library, in this library, I have a header file which contains common used type alias and template constexpr, what is the proper name of this file? currently it is "common_toolkit", but I think it is not "toolkit" in fact.
Anonymous
Error in this code??? int i = 1,n,f; cout<<"Enter a number "; cin>>n; f = n / 10; while(i <= 2) switch (f){ case 1; cout<<"ten"; break; case 0; break; case '1'; cout<<"one"; break; } f = char(n%10); i++; }
Anonymous
In switch we have f and at first we diclare it's value
Anonymous
If n is 11 then it print ten one but it print ten ten
Anonymous
This is for sample