klimi
what is your code?
Guillermo
Timm
how to write a program in c programming language
Guillermo
With the keyboard?
Егор
Hello everyone, can you please help, I don’t understand how to correctly connect the Vosk Api library to a C ++ script in VS Code
abdisa
Ashutosh Kumar
Albatross
Hey everyone,
I'm currently searching for the latest version of the Mingw GCC compiler executable file. I had it a few months ago, but unfortunately lost it. Despite searching online for a while now, I haven't been able to find the executable file anywhere. I was wondering if anyone in this group could help me out by providing a download link for the latest version of the Mingw GCC compiler executable file.
Guillermo
Dis you search It on Google?
Guillermo
Sth like: last versión of MinGW gcc?
GOPA
20.3.6 Return Type Relaxation
There is a relaxation of the rule that the type of an overriding function must be the same as the type
of the virtual function it overrides. That is, if the original return type was B∗, then the return type of
the overriding function may be D∗, provided B is a public base of D. Similarly, a return type of B&
may be relaxed to D&. This is sometimes called the covariant return rule.
This relaxation applies only to return types that are pointers or references, and not to ‘‘smart
pointers’’ such as unique_ptr (§5.2.1). In particular, there is not a similar relaxation of the rules for
argument types because that would lead to type violations.
Consider a class hierarchy representing different kinds of expressions. In addition to the opera-
tions for manipulating expressions, the base class Expr would provide facilities for making new
expression objects of the various expression types:
class Expr {
public:
Expr();
// default constructor
Expr(const Expr&);
// copy constructor
virtual Expr∗ new_expr() =0;
virtual Expr∗ clone() =0;
// ...
};
The idea is that new_expr() makes a default object of the type of the expression and clone() makes a
copy of the object. Both will return an object of some specific class derived from Expr. They can
never just return a ‘‘plain Expr’’ because Expr was deliberately and appropriately declared to be an
abstract class.
A derived class can override new_expr() and/or clone() to return an object of its own type:
class Cond : public Expr {
public:
Cond();
Cond(const Cond&);
Cond∗ new_expr() override { return new Cond(); }
Cond∗ clone() override { return new Cond(∗this); }
// ...
};
Section 20.3.6
Return Type Relaxation
This means that given an object of class Expr, a user can create a new object of ‘‘just the same
type.’’ For example:
void user(Expr∗ p)
{
Expr∗ p2 = p−>new_expr();
// ...
}
The pointer assigned to p2 is declared to point to a ‘‘plain Expr,’’ but it will point to an object of a
type derived from Expr, such as Cond.
The return type of Cond::new_expr() and Cond::clone() is Cond∗ rather than Expr∗. This allows a
GOPA
i was reading "the c++ programming language " book i found the line Expr∗ p2 = p−>new_expr(); difficult to understand can anybody help
Albatross
Dis you search It on Google?
Yes, a few months ago, I searched for MinGW for Windows 64-bit and found it easily through a Google search. However, I recently tried to find it again, but despite numerous attempts, I have not been able to locate it. I was able to download version 10 of Atlee's MinGW, but I am still unable to find the version I previously downloaded.
\Device\NUL
\Device\NUL
𝔖𝔞𝔯𝔬
Guys, any way to load an image with sdl at compile time? Like a constexpress function or smth like that
𝔖𝔞𝔯𝔬
Loading an image in an sdl texture?
klimi
klimi
𝔖𝔞𝔯𝔬
𝔖𝔞𝔯𝔬
I mean i would still have to load them at run time, wich i think would cause performance issues
klimi
I mean i would still have to load them at run time, wich i think would cause performance issues
well if you are loading from jpg, you would load like 5mb file and you would be fine. With uncompressed you would have for example 4000x6000x3 image that's rgb8, that's like 70MB of storage that will need to be loaded in order to execute your binary. Usually you do optimatizations and you load your assets on the fly only when they are needed. Is your problem only the time it takes to load the assets?
𝔖𝔞𝔯𝔬
𝔖𝔞𝔯𝔬
Why not
𝔖𝔞𝔯𝔬
That would also mean that for really small applications, i don’t need to download the assets with the binary cause they would be loaded in the binary itself
klimi
klimi
I am not sure how SDL_image works, it might not even have some loading/exporting because of the nature of things -> you load assets at run_time
𝔖𝔞𝔯𝔬
klimi
\Device\NUL
Add the path
\Device\NUL
And then just cl /O2 /GA file.pp
\Device\NUL
Lmao, escape the link
\Device\NUL
tiny(.)url
\Device\NUL
Albatross
Can anyone help me with adding a path to the environment for Microsoft Visual Studio C++ so that I can compile C++ code? Also, which path should I add to compile C++ code?
Also, I noticed that nowadays the MinGW GCC compiler doesn't come with a binary executable file. I found the latest version,".zip file" Is it possible to compile source code into an exe file using this version?
Furthermore, C++ is my favorite programming language but these small struggles are starting to bore me. It's disappointing that good compilers are not being developed which could make learning and using C++ more enjoyable. Can anyone offer a solution or advice? Thank you!
\Device\NUL
Albatross
Can you just search "MSVC file location" ?
I searched on the internet for information on how to add the path for Microsoft Visual Studio++ 2019 for compiling C++ code. I found that the path to add is "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community". However, I couldn't find any .exe files in that directory, which has left me confused.
\Device\NUL
\Device\NUL
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\Hostx64
It only takes me less than one minute.
\Device\NUL
You just need to find exact keyword. Now let me enjoy Gnome desktop alone
\Device\NUL
https://stackoverflow.com/questions/61554532/where-is-msvc-installed-detecting-location-of-cl-exe-and-link-exe
Albatross
I was wondering if you could share your experience on how you compile C++ code nowadays. I haven't worked with C++ in the past six months, so I'm looking to learn from your experience.
Additionally, I used to work comfortably with the Mingw C++ compiler. thanks
Albatross
How come MinGW g++ compilers no longer provide a standalone installer format? Instead, why are they only offering source code nowadays?
\Device\NUL
Danya🔥
Danya🔥
Either use Linux
Danya🔥
Or on windows MSVC or clang
\Device\NUL
But Clang on Windows need MSVC stuffs
Danya🔥
\Device\NUL
\Device\NUL
I don't know why Clang on windows has no built-in headers
Danya🔥
\Device\NUL
So what?
You can't install LLVM toolchain standalone, You must install it alongside MSVC
Danya🔥
\Device\NUL
Danya🔥
\Device\NUL
\Device\NUL
So?
Incase somebody want to use clang but want to ditch msvc
Albatross
can any one tell why we can't able to find mingw compiler as exe file please reply
Albatross
I am feeling quite exhausted from searching for the Mingw GCC compiler executable file with version 10. It was available a few months ago, but now I am unable to find it on the internet. I am wondering if there is an alternative solution for Mingw GCC that would be better. Any help or advice would be greatly appreciated. Thank you.
Danya🔥
Albatross
Skill issue
It's alright if I'm not aware of the latest updates regarding Mingw. If you have any information about it, please share. Thank you!
mito
Albatross
mito
NazTfgh
Hi.
guys I need help with my programmer
It's a clone of ST-LINK/V2 and my IDE cannot connect to it.
Is there someone to help?
Guillermo
what problem do you have? and what's your IDE?
Guillermo
I use PlatformIO which is a plugin for VSCode. Look at here for more info and examples: https://docs.platformio.org/en/stable/plus/debug-tools/stlink.html
Chat Boss
Davide Schintu sent a huge message, it has been re-uploaded as a file
Hi guys! I'm pretty new to C++ but I have to use it for work (fluid simulations).
I have two cl..
Davide
NazTfgh
NazTfgh
Guillermo
I don't know that IDE. Do you have installed the drivers for that device in your operating system?
Guillermo
Maybe you should see the Documentation of the IDE. Maybe there are tutorials or examples about using it.