mito
It's early morning, need to sleep now.
mito
Thank you @usernamestring
Simple Sorcerer
Thank you @usernamestring
You can read more on the website learncpp com Chapter 12 Compound Types: References and Pointers
mito
Literally the below. #define bool int #define true 1 #define false 0
Manav
I finally found the problem and I'm very frustrated. Someone did, #define bool int in the codebase. 🤬
Haha, well bool wasn't defined back in the day so people used to do this.
Simple Sorcerer
now C has this type.
Simple Sorcerer
Really???
yes. personally, I defined it as unsigned char
mito
Damn, I spent two days trying to find the error 😭
Manav
now C has this type.
Only when you include stdbool haha
Simple Sorcerer
Really???
to access the built-in bool you need to define #include <stdbool.h>
Simple Sorcerer
*IN C
mito
People should stop using macros, it is the source of hard to find errors.
Simple Sorcerer
People should stop using macros, it is the source of hard to find errors.
Now I think that the error is not in the overriding, but in the fact that you used C code in C++
Simple Sorcerer
C++ wouldn't define the bool type
mito
Now I think that the error is not in the overriding, but in the fact that you used C code in C++
It's legacy code, written a couple of decades back and some files haven't been updated at all.
Jahangir Sohag
Can amyone help me?
Rose
Can amyone help me?
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
James
Can anyone tell me how to write code of hollow staircase in c++
Simple Sorcerer
I'm unlikely to be able to help you with anything. I think you should ask the developers a question. Or maybe someone else in this group will answer you
Mohamed Hameem
Guys any knows about visual code?
Mohamed Hameem
Need to run out put but doens't exit even I run c/c++ extension with code runer for c programming
Mohamed Hameem
Iam beginner so not know much about it.
Anonymous
Hello everyone, my name is Shivam Thakre and I am delighted to be a part of this group. I am new to this community and would appreciate all your support and guidance. Looking forward to interacting with all of you and learning from your experiences. Thank you!
Manav
Need to run out put but doens't exit even I run c/c++ extension with code runer for c programming
You need to setup vscode, primarily the task (task.json) and run (launch.json) actions. And i'll assume you have a debugger installed. If not we can guide you on it.
Simple Sorcerer
You need to setup vscode, primarily the task (task.json) and run (launch.json) actions. And i'll assume you have a debugger installed. If not we can guide you on it.
Damn it. That's the only reason I switched to the console, so I didn't have to mess with the IDE settings
Simple Sorcerer
Damn it. That's the only reason I switched to the console, so I didn't have to mess with the IDE settings
If someone also wants to program in the console. I can recommend vim, but it will take some time to master it. By installing extensions it becomes as good as an IDE You also need at least minimal knowledge of how to write makefiles. And you can download from github ready-made makefiles to build a project from subfolders.
Bala
C++ interview material
Simple Sorcerer
Bala
May I know where the link
Simple Sorcerer
May I know where the link
I thought you were saying this is a topic for another group.
Simple Sorcerer
Maybe can try clion?
I don't know. From IDEs I tried NetBeans and VisualStudio. Well, I think all IDEs are good, but I still prefer the console now. I have enough functionality and vim prompts for efficient development
Simple Sorcerer
I don't know. From IDEs I tried NetBeans and VisualStudio. Well, I think all IDEs are good, but I still prefer the console now. I have enough functionality and vim prompts for efficient development
But for beginners, it's best to just download an IDE that will do everything for you, and you just write the code and hit the "run" button. Codeblocks seems to even provide its own compiler. So you don't even have to download additional compilers (for Windows + customize environment variables)
Simple Sorcerer
Simple Sorcerer
Abdelghani
Hi there, I need help considering make and makefile in addition to header files
Alexander
Hi there, I need help considering make and makefile in addition to header files
Use include directive in makefile and -MD option for gcc/g++
Simple Sorcerer
Hi there, I need help considering make and makefile in addition to header files
hi. If you want to learn more about makefile you can read GNU make, it's very detailed. In brief: target: dependency commands goals usually look like all: filename.o gcc <flags> -o main <all_file.o> filename.o: filename.c filename.h gcc -c -g filename.c -o filename.o note. you can even leave out dependencies and it will work. but when editing these files make will not see them edited. goals usually look like filename.o: filename.c filename.h gcc -c -g filename.c -o filename.o note. you can even leave out dependencies and it will work. but when editing these files make will not see them edited. goals usually look like filename.o: filename.c filename.h gcc -c -g filename.c -o filename.o note. you can even leave out dependencies and it will work. but when editing these files make will not see them edited. the default target is "all".
Simple Sorcerer
basic mistakes when writing a makefile. !!! mandatory use of TAB !!!
Simple Sorcerer
I'm sorry, telegram doesn't display TAB
Simple Sorcerer
Oh, I can't even send a picture.
Simple Sorcerer
===== Makefile ===== all: main.o gcc -o main main.o main.o: main.c gcc -c main.c -o main.o ===== main.c ===== #include <stdio.h> int main(){ printf("Hello World\n"); return 0; }
Simple Sorcerer
in the makefile before gcc. replace spaces with TAB.
The 🧩 🎲
Hello coders i have no prior knowledge in programming can i be able to learn c++ as my first Language am a beginner?
.1
How I start DSA in c++ please tell me the roadmap
Y
How to quickly understand multi-dimensional vector concepts
Ludovic 'Archivist'
How I start DSA in c++ please tell me the roadmap
Look at the already implemented algorithms in the library, write a use-case for it (for example a quick-sort function from std::partition)
Ludovic 'Archivist'
How I start DSA in c++ please tell me the roadmap
Once that is done, replace the standard algorithm with your own textbook implementation. Try to write it with iterators too. Once that is done, make your implementation generic with templates. Once that is done, specialize it for different iterators (for example, some worse sorting algorithms can be faster for non-random iterators), tinker about and investigate performance Then, once done, do the same with standard datastructures, same steps, same everything
Mohamed
Hello , how can I understand boolean values and how to use it while coding
Simple Sorcerer
Hello , how can I understand boolean values and how to use it while coding
You should read more carefully about variables. Visit learncpp com
Adeyemo
Hello I need help with a linker error, I'm a beginner so I have a function in my header file and I'm trying to use that function inside another project, it worked earlier and then I restarted my system and then I started getting undefined reference error
Adeyemo
Please can anyone help me with this?
Simple Sorcerer
Please can anyone help me with this?
Send code in file to private message
Simple Sorcerer
Or you can send it here by text
Simple Sorcerer
Please can anyone help me with this?
Please also post the complete error.
Adeyemo
Okay thank you
Emi
Can someone have a C++ cheat sheet ?
Simple Sorcerer
Can someone have a C++ cheat sheet ?
Over time, you will remember the basic functions. Google I think is a good and universal cheat sheet
Simple Sorcerer
Newbies. Help each other. This will help you learn the material better. If you say something wrong, we will correct you. Don't be shy
Ludovic 'Archivist'
Rose
Purge complete.
Ma
why icant say
Ma
Why can't my code correctly output 'C' information in the VS Code environment, but it works with GCC? It might be due to issues related to bitfields.
Ma
how do i send code?
Danya🔥
how do i send code?
Github Gist, Pastebin
Ma
https://stackoverflow.com/questions/77293474/why-cant-my-code-correctly-output-c-information-in-the-vs-code-environment-b
Ma
hey stack overflow good!