Anonymous
Anonymous
there are some situations where the extra function call is elided and the object is directly constructed at the call site as well.
Anshul
Anshul
Ok so the object will be returned from function and it'll be copied to the call site object. Right?
Anshul
And will it be shallow or deep copy?
Amy
Detail program code?
Anshul
Anshul
Anonymous
What's nrvo
https://en.cppreference.com/w/cpp/language/copy_elision
Anshul
'n' denoting the number of strings to sort.. constraint is 1 <= n <= 10^5... when i write this string s[100005]; i get segmentation fault but when i write this int n; cin»n; string s[n].... the code runs successfully. why is it so
Anshul
Anshul
Anshul
Anshul
👍
Anonymous
Anonymous
Stack space is NOT as large as ram and is often around 1 to 8 MB on most systems for the application main thread
Yasas
i have a little problem
Yasas
im creating an FPS offline game for IGI fans.
should i entirely code my game in c# or should i use unity?
Yasas
or should i use c++?
Yasas
instead of c#?
Anonymous
Unity uses C#
Anonymous
For scripting
Yasas
Yasas
i mean should i code my game in c++ or make it using unity?
Anonymous
Unity is easier as it does A LOT of stuff for you
Yasas
Yasas
Yasas
write it then
klimi
then you will have to tell me your motivation behind the project
Anonymous
Such as camera, viewport, 3D objects, animations, coordinates, models, etc are all handled by unity for you
Yasas
klimi
i am afraid i don't understand how it is connected
Yasas
cuz i have 4gb ram, intel core i3 4th gen cpu and gtx 660
Yasas
Yasas
but my laptop is not powerful enough
klimi
how is that connected to the game you want to create?
klimi
if you want to work for epic games, then you should use their development tools
Yasas
klimi
if you want to work for epic, then https://www.unrealengine.com/en-US/ would be the way to go...
Yasas
i know
Yasas
epic games created the unreal engine
Yasas
but i need a computer
Yasas
powerful enough to handle it
klimi
then buy a computer and you don't have to decide between c+= and c#
Yasas
Yasas
thats why im creating this game in the first place
klimi
so it's not about learning to code, but it is about creating a game so you would get money?
Yasas
klimi
then don't use C++
Yasas
you do not know the pain of being poor
klimi
go for unity
Anonymous
Ontop of that, it handles complex stuff such as
scene graphs which handles objects in 3d space relative to both camera and origin
Physics loops which are timer driven
Shaders, materials, and shadows
Lighting
And so on
klimi
Yasas
klimi
i do know the pain, i was 12 years with i3-380m with gt-310m
klimi
your machine vs my old one is quite powerful
klimi
yeah, it's enough
Yasas
i earned money by begging in the streets to buy my current one
Yasas
klimi
i don't think we (as this c/c++ group) can help you in this matter
Yasas
Yasas
its fine
klimi
+ it's getting quite offtopic... but everyone had to start somewhere....
Yasas
Anonymous
Basically at the core of ALMOST every game, is some kind of game engine, which handles all or most of the stuff i mentioned
Without a game engine of some kind, it is difficult to make a 3D game that is of reasonable quality, if at all
Yasas
so i will stop this discussion here
klimi
if you just want to create game, you can have a look at godot, i have heard it is not as that bad and it is opensource
Yasas
Anonymous
Yasas