\Device\NUL
Also, printf or std::cout didn't have support for it
Manav
Can someone tell how to use 128 bit integer in c++?
Looks like an xy problem 🤔. Provide more details xyproblem.info
suraj
줄리아 우지야노바
Shuvo
Hello
Michel
Why doesn't priority_queue::pop return the top element? 🤔
Anonymous
Why doesn't priority_queue::pop return the top element? 🤔
Because if someone doesn't need it, that will be a waste. You can easliy write a version of pop() that return the top element using pop() and top().
zawkin | 🇵🇸
char ch;     cin.get(ch, 25);        // Print ch     cout << ch;
zawkin | 🇵🇸
Input: Hello Output: Hello
Xiu
Why I can't run c++ in vsc I have install extension c++
imminent
Why I can't run c++ in vsc I have install extension c++
you'll need to install your toolchain yourself
imminent
is it msvc, mingw gcc or clang, or custom built clang it's up to you
imminent
vs code is an editor, not a full blown ide with compiler
Иван
Why I can't run c++ in vsc I have install extension c++
https://github.com/HO-COOH/CPPDevOnWindows
Anonymous
zawkin | 🇵🇸
This code has compile error: error: no matching member function for call to 'get'
https://www.geeksforgeeks.org/cin-in-c/ I copied this code from here
Anonymous
https://www.geeksforgeeks.org/cin-in-c/ I copied this code from here
someone had pointed it out in discussions: https://www.geeksforgeeks.org/cin-in-c/#discuss
Danya🔥
Can a C programmer transition to c++ programming with ease?
With ease — no There are a lot of practices in C which are considered okay but in C++ they are bad practices
Anonymous
Why doesn't priority_queue::pop return the top element? 🤔
It doesn't do so because the code won't be exception safe. The standard containers offer strong exception guarantee - ie if an exception is thrown during any operation on the container, the container's state will remain the same as it was before the exception. If pop were to return a value, this value may need to be copied at the call site which may throw an exception. Since the element has been popped off the container, this element would be lost for ever.
Danya🔥
Danya🔥
I recommend you to read all the books by Scott Meyers
Danya🔥
And something like https://github.com/cpp-best-practices/cppbestpractices
The
Anybody has used perf here? Have some questions
The
Hmm alright.. Help me display symbol name in perf report output.. I compiled program with -g , also used perf report -g .. still getting hex instead of symbol name
Danya🔥
Hmm alright.. Help me display symbol name in perf report output.. I compiled program with -g , also used perf report -g .. still getting hex instead of symbol name
If you're getting hexadecimal addresses instead of symbol names in the perf report output, it might be because the necessary debug information isn't available or properly configured. Here are some steps to help you display symbol names: 1. Check Debug Information: Ensure that you've compiled your program with debugging information included. You mentioned using the -g flag, which is correct. This flag tells the compiler to include debugging symbols. Make sure you compiled your code with it. 2. Check Perf Settings: When using perf, it should automatically use the debugging information if available. However, ensure that you are using the -F option to specify the format when running perf report. For example: perf report -F symbol 3. Check Perf Map Files: Perf uses map files to map addresses to symbol names. These map files are often located in /usr/lib/debug or /usr/lib/debug/usr. Ensure that your system has these map files installed for the specific binaries you are profiling. 4. Symbol Resolution: Sometimes, symbol resolution might fail due to mismatched binaries or libraries. Ensure that you are profiling the same binary for which you compiled with debugging information. 5. Update Perf: Make sure you are using an up-to-date version of perf. Older versions may have issues with symbol resolution. 6. Check Permissions: Ensure that you have the necessary permissions to access the debug information and map files. You might need superuser privileges in some cases. 7. Try --vmlinux Option: If you are profiling the Linux kernel, use the --vmlinux option to specify the path to the kernel image with debugging symbols.
The
If you're getting hexadecimal addresses instead of symbol names in the perf report output, it might be because the necessary debug information isn't available or properly configured. Here are some steps to help you display symbol names: 1. Check Debug Information: Ensure that you've compiled your program with debugging information included. You mentioned using the -g flag, which is correct. This flag tells the compiler to include debugging symbols. Make sure you compiled your code with it. 2. Check Perf Settings: When using perf, it should automatically use the debugging information if available. However, ensure that you are using the -F option to specify the format when running perf report. For example: perf report -F symbol 3. Check Perf Map Files: Perf uses map files to map addresses to symbol names. These map files are often located in /usr/lib/debug or /usr/lib/debug/usr. Ensure that your system has these map files installed for the specific binaries you are profiling. 4. Symbol Resolution: Sometimes, symbol resolution might fail due to mismatched binaries or libraries. Ensure that you are profiling the same binary for which you compiled with debugging information. 5. Update Perf: Make sure you are using an up-to-date version of perf. Older versions may have issues with symbol resolution. 6. Check Permissions: Ensure that you have the necessary permissions to access the debug information and map files. You might need superuser privileges in some cases. 7. Try --vmlinux Option: If you are profiling the Linux kernel, use the --vmlinux option to specify the path to the kernel image with debugging symbols.
I thought -F was for frequency.. can you link me to it's manual somewhere online? I compiled it for 5.x.x linux
Anonymous
I thought -F was for frequency.. can you link me to it's manual somewhere online? I compiled it for 5.x.x linux
It is indeed frequency as I mentioned in the other group. Anyway just ask your questions in one group and wait for a reply. Only if you don't get an answer post your question in another group
Diana
I recommend you to read all the books by Scott Meyers
Thanks once again, but overall, with a solid foundation in C programming, you'll have a good starting point for learning C++ and be able to leverage your existing knowledge and experience to become proficient in C++ programming in no time; that's my nice opinion.
The
this is very high right : context-switches # 0.562 K/sec
The
nvm it seems alright
Ruthless
Xzon Kai: CS0029 how to fix this error Trying to do this Public UILabel health number = 9999f But I get the CS0029 implicitly type 'float' to 'UILabel'
Chat Boss
Lee Sin sent a code, it has been re-uploaded as a file
Ahesanali GS
int x{2}; std::cout << (x = 5) << '\n'; What will be the output of this.......
hitori-janai
Hello
%Nikita
Lee Sin sent a code, it has been re-uploaded as a file
> float array[ ] = {0}; maybe you should specify array size explicitly?
Vansh
any all in one header file
Vansh
in c++
MᏫᎻᎯᎷᎷᎬᎠ
Ooof, that is certainly a way to learn "C with Classes and Bad Habits™️" but not a way to learn C++
I'm giving C taking only 20% approximately as being a subset - with few exception- of C++
MᏫᎻᎯᎷᎷᎬᎠ
Or less Even templates are larger
Diana
I already know that c++ has grown to be a larger and with its new features added made the language totally new.
Chat Boss
Lucifer sent a code, it has been re-uploaded as a file
.1
I am not able to think of the condition on the line where the logic is written.
Anatolii
Hello guys! I would like to ask if any of you could recommend me some materials about how to implement Abstract Syntax Tree in C. I'm currently building a simple version of shell in C, the task which I have now is to tokenize a user's input, after I would like to store all the tokens in AST and pass them to executor. Thank you!
Ludovic 'Archivist'
I already know that c++ has grown to be a larger and with its new features added made the language totally new.
It is just that if you teach C first, pointers will look to beginners like the solution to every problem
Diana
So the point here is that, if you wanna learn C++, just learn it rather than adopting C style into C++.
Kanni
Hello guys! please I need help with this function. I keep getting segmentation fault, and I don't know why:
Chat Boss
Kanni . sent a huge message, it has been re-uploaded as a file /** * _strtok - extracts tokens from strings (like strtok) * * @str: The string to be split * ..
Ashish
Can someone tell me how to become a software engineer After learning programming language and DSA
Ziky
Can someone tell me how to become a software engineer After learning programming language and DSA
Just write it on your business card and CV. Never heard of any regulation of calling yourself software engineer
Kanni
Please help. Thanks!
Ziky
https://paste.ubuntu.com/p/VHNdF9NVhf/
Have you tried debugging it?
Kanni
I don't know how to
Ziky
I don't know how to
https://duckduckgo.com/?q=%3CNAME+OF+YOUR+IDE+HERE%3E+how+to+debug+C+code&t=ffab&ia=web
The
anyone knows what's this flag for in g++ (it's lower case) (more info: my -Wall gets supressed when this is there, i tried replacing it with upper case -W or removing it now it works): -w
Anton
Hello, does anyone have experience with windows driver development? I need time-to-time someone to audit or writing windows drivers
Muyi
i have a better idea
Anton
Have or need?
have - original post fixed
2105607_Arpit sahu
https://pastebin.com/wiWz3ZNb can anyone identify the error
Mr.
I am beginner in C language so pls suggest for learning c from basic to advanced 😢