klimi
/add@daysandbox_bot whitelist-domain https://onlinegdb.com
can you check the docs? it's in russian can't read it :/
klimi
Lol Russian dominantion
i won't comment on this :)
Danya🔥
@eshpengler it seems like I've added the onlinegdb to the whitelist. Could you please send the link once again just to test if it works?
Danya🔥
So stupid
Edgar
> Message from Edgar Shpengler has been removed because it is not allowed to post links in this group for first 24 hours
Edgar
may be onlinegdb.com/hL7ImZgD9?
Danya🔥
Danya🔥
may be onlinegdb.com/hL7ImZgD9?
Could you send this link?
Edgar
https://en.cppreference.com/w/cpp/language/parameter_pack
It does not help. I know what templates with a list of arguments are, but I don’t understand how to apply a specific function to each argument
Edgar
Could you send this link?
sent. it's removed by bot again
Danya🔥
It does not help. I know what templates with a list of arguments are, but I don’t understand how to apply a specific function to each argument
All you need to know is on the page Take a look at "pack expansion" and "fold expressions" If that's not enough, Google these key phrases for more examples and more simple explanations
Sinan
Hi my name is Sinan
Sinan
İ am Reading Now Thank you very much
Sinan
#include <shlobj.h> in the library In the IShellIconOverlayIdentifier Class GetOverlayInfo(PWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags); How can I call the function from my application?
Danya🔥
#include <shlobj.h> in the library In the IShellIconOverlayIdentifier Class GetOverlayInfo(PWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags); How can I call the function from my application?
Let's ask chatgpt: To call the GetOverlayInfo function from the IShellIconOverlayIdentifier class in your application, you need to follow these steps: 1. Include Necessary Headers: Ensure you include the necessary headers in your application. This typically includes <shlobj.h> as you've already mentioned. 2. Link Against Required Libraries: Make sure you link against the necessary libraries. For shell extensions, this is usually Shell32.lib. 3. Obtain an Instance of IShellIconOverlayIdentifier: Before you can call GetOverlayInfo, you need an instance of a class that implements the IShellIconOverlayIdentifier interface. This might involve creating an instance of a COM object that implements this interface. 4. Call GetOverlayInfo: Once you have the instance, you can call the GetOverlayInfo method on it. You need to pass a buffer for the icon file path, the size of this buffer, a pointer to an integer to receive the index of the overlay, and a pointer to a DWORD to receive the flags. Here's a basic outline of how the code might look: #include <shlobj.h> // Other necessary includes... // Assuming you have an instance of a class that implements IShellIconOverlayIdentifier IShellIconOverlayIdentifier* pOverlay; // Initialize COM and create an instance of the COM object // ... WCHAR szIconFile[MAX_PATH]; int nIndex; DWORD dwFlags; HRESULT hr = pOverlay->GetOverlayInfo(szIconFile, MAX_PATH, &nIndex, &dwFlags); if (SUCCEEDED(hr)) { // Use the icon file path, index, and flags as needed } Keep in mind that this is a simplified outline. The actual implementation will depend on how you're obtaining or implementing the IShellIconOverlayIdentifier interface, and how you're handling COM initialization and cleanup in your application. If you're not familiar with COM programming in Windows, you might need to read up on that, as it can get quite complex.
Edgar
All you need to know is on the page Take a look at "pack expansion" and "fold expressions" If that's not enough, Google these key phrases for more examples and more simple explanations
solved! thank you! it is "pack expansion". found the answer here https://stackoverflow.com/questions/25680461/how-do-you-loop-over-a-parameter-pack-using-a-pack-expansion code for history: https://onlinegdb.com/BWZ9Km9Pvx short code template <typename... Args> auto convert_args( Args... args ) { return std::make_tuple((convert(std::forward<Args>(args)))...); }
heig
looking for a c++ resume😂
PhD
How is the value of a character constant that has more than one characters calculated? I've been playing around with character constants and surely I get a "multi-character constant" warning if I store there more than one character, but the program runs successfully, and I can't seem to find any pattern in the numeric values. Just as a small example: printf("1. %d\n", 'k'); printf("2. %d\n", '\n'); printf("3. %d\n", 'kd'); printf("4. %d\n", 'dk'); printf("5. %d\n", 'kdя'); printf("6. %d\n", 'яdk'); The output(consistent for all the values): 1. 107 2. 10 3. 27492 4. 25707 5. 1801769359 6. -779131797
\Device\NUL
The third line is basically, `(int *)"kd", its takes two char as sequentes of bit than interpreted ot as 32 bit
PhD
If it's not an invalid str > int type casting, then excuse my ignorance. Would be nice to educate myself on that :)
PhD
It took me quite a while to understand, but I found an explanation. The compiler when there's >1 characters in a character constant treats it like a multi-bytes integer: 1. For 'xy' it's ('x'*256 + y) 2. For 'xyz' it's ('x'*256^2 + 'y'*256 + 'z')
Anonymous
It took me quite a while to understand, but I found an explanation. The compiler when there's >1 characters in a character constant treats it like a multi-bytes integer: 1. For 'xy' it's ('x'*256 + y) 2. For 'xyz' it's ('x'*256^2 + 'y'*256 + 'z')
I found this explanation useful on cppreference: > Multicharacter constants were inherited by C from the B programming language. Although not specified by the C standard, most compilers (MSVC is a notable exception) implement multicharacter constants as specified in B: the values of each char in the constant initialize successive bytes of the resulting integer, in big-endian zero-padded right-adjusted order, e.g. the value of '\1' is 0x00000001 and the value of '\1\2\3\4' is 0x01020304.
Edmin
I am a C/C++ developer. I have 20 years experience in these fields Also I am good at Data Structure and Algorithm I was participated in ACM ICPC during university
Edmin
If anyone has task, please hire me
Rose
User Abhishek has 1/2 warnings; be careful! Reason: job opening
Edmin
Oops...
Danya🔥
Oops...
Let's go to #ot chat
Rose
Offtopic discussions should be done in the C/C++ Offtopic group. Please take your discussion/questions there.
Ludovic 'Archivist'
Yeah, just more elaborate. Why hexadecimal though, if char. const. are of int ?
'\1' is 1 and '\1\2\3\4' is 16909060 if that is any more clear to you
Ludovic 'Archivist'
but '\1\2\3\4' could just as well evaluate to 67305985 (if that is clear to your adled brain)
shafe shabaninejad
Suka
Yeah, just more elaborate. Why hexadecimal though, if char. const. are of int ?
because sometimes hex easy to read than dec. (cpu always see it as hex/binary)
Alfian Hidayat
Hi how do u guys setup c/c++ dev env in windows?
Ludovic 'Archivist'
Hi how do u guys setup c/c++ dev env in windows?
Windows systems can use several environments with different advantages. You can install Visual Studio and have the installer setup a graphical environment for C++ development
Rose
Another one bites the dust...! Banned snooplord.​eth. Reason: non english, rude, spammer, scammer
Manav
Hi how do u guys setup c/c++ dev env in windows?
Depends on what kind of setup you need.
Alfian Hidayat
I want to setup like in unix-like env
Manav
I want to setup like in unix-like env
Use scoop.sh to install mingw-winlibs-llvm-ucrt
Manav
I am assuming you don't want to use windows sdk.
Ludovic 'Archivist'
I want to setup like in unix-like env
You can go on the website of MSYS2 and follow the instructions on the main page
Anonymous
Hi
Sudesh
Can anyone give me the coding formula of C++ please?
Ludovic 'Archivist'
PhD
but '\1\2\3\4' could just as well evaluate to 67305985 (if that is clear to your adled brain)
Friendo, people might not understand sometimes something, it's okay, chill out)
Ludovic 'Archivist'
Friendo, people might not understand sometimes something, it's okay, chill out)
I just gave you exactly what you asked, don't worry I was having a bit of fun
Warren
and how should I put code here?
Warren
76 lines of code is too much to post here directly
Warren
I get the following message when executing the code: > "Failed to suspend Steam.exe. Error code: 6" According to the Microsoft documents this means "ERROR_INVALID_HANDLE" (The handle is invalid.), but how can I change/adapt the code so that suspending steam.exe works without error messages? Code: https://pastebin.com/2CUCVM68
Ludovic 'Archivist'
"... your addled brain" Good fun, cap)
Were you not confused? I think that was pretty accurate given that you asked why the demonstration used hexadecimal and not decimal and I gave you an equally confused answer
Warren
Work?
Works better now yes
Warren
This is C code: https://pastebin.com/raw/pLsxzRBH This is pseudocode: main: check_instance: if another_instance_is_running: pass_arguments_to_running_instance_and_exit suspend_steam_exe: if suspension_unsuccessful: exit_with_error_code_1 else: resume_steam_exe_after_successful_suspension if valid_exe_path_provided: execute_subprocess: command: provided_exe_path continue_running_in_background_and_wait_for_commands else: continue_running_in_background_and_wait_for_commands What's wrong/missing in the C code from the pseudocode?
Anonymous
Hello dear devs, I'm a junior c++ developer. I currently code in c++14 and wanted to ask what are the benefits of moving to a newer standard like c++20? Is it a huge work to migrate to a newer standard?
Alfian Hidayat
https://en.wikipedia.org/wiki/C%2B%2B#History, check language standards/revisions section
Anonymous
Thank you 🙏
Ya deway
Someone want work with me in a Project?
Ya deway
Windows api and opencv for image recognition like an AI
Edmin
Someone want work with me in a Project?
I'm interesting. Please feel free to DM me
Jer
Someone want work with me in a Project?
I'm very new to C/C++ but would love to learn more. If you would want to include me
💰💵⚛️💹⚛️💵💰
Rose
Another one bites the dust...! Banned Digital India. Reason: job spam
Kenshin
Hello dear devs, I'm a junior c++ developer. I currently code in c++14 and wanted to ask what are the benefits of moving to a newer standard like c++20? Is it a huge work to migrate to a newer standard?
1) Improvements to the core language and it's std library usually provide better support for programming paradigms that enable you to express your ideas in code more precisely, cleanly, clearly, and usually more efficiently, for either compile, runtime, or maintenance efficiency. 2) First, do you really need to migrate the codebase? What benefits, in terms of supported programming paradigm, cleaner and clearer code, development productivity, and compile, runtime, or maintenance efficiency would migrating bring your project? If you consider that carefully and still need to migrate, then the answer totally depends on the size of the codebase, and the skill and understanding of the coders as far as the new standard is concerned.
VD
Hello dear devs, I'm a junior c++ developer. I currently code in c++14 and wanted to ask what are the benefits of moving to a newer standard like c++20? Is it a huge work to migrate to a newer standard?
If you are a junior dev, you should consult the senior devs in your organization. First of all moving just the compilation environment from C++14 to C++20 should be a relatively easier move (barring a few exceptions). Most of the code that compiles on C++14 would compile on C++20 compiler as well. For migrating the code itself to C++20 however would be a decision that all the stakeholders in your organization need to make. This would include code reorganization (modules), code refactoring to use the latest features provided by C++17 and C++20, build tool modifications (to support modules), changing your unit testing code to cover the code refactoring and reorganization, extensive end to end testing and blah blah blah. These are not decisions that a junior developer would make
M
Hello techlovers 😍 I m a tech savvy 🦸‍♂️ Feel free to talk me your trouble at laptop 💻 & desktop 🖥