klimi
Hii friends
welcome! Please read the pinned message :)
Anonymous
What logic solve this problem
Anonymous
You have to write two programs to transform input array into output array. Part 1 Input Array :  2,4,8,5,12,15,6,10,7,30,25,43,46,45,21 Output Array :  2,4,8, 12, 6, 7, 43,46,21, 5,15,10,30,25,45  
Anonymous
Thanks
🌺👍
Anonymous
Welcome bro
Anonymous
Hey guys do I need to finish oop concepts of C++ to learn how to use unreal engine?
You really need a deep understanding of: 1- Programming 2- and The C++ Programming Language 3- and various programming technique and patterns. 4- and more based on what you want to do. your question is not clear.
Anonymous
You really need a deep understanding of: 1- Programming 2- and The C++ Programming Language 3- and various programming technique and patterns. 4- and more based on what you want to do. your question is not clear.
Well I can't get any more clear than this. I tried to check my answer and people usually answer based on opinion so I needed some actual advice
Anonymous
Answer this question
Anonymous
How can solve
Well you do the usual and then you just got to access each element of the array by using its index number
Talula
What?
Anonymous
You know this answer
Anonymous
You have to write two programs to transform input array into output array. Part 1 Input Array :  2,4,8,5,12,15,6,10,7,30,25,43,46,45,21 Output Array :  2,4,8, 12, 6, 7, 43,46,21, 5,15,10,30,25,45  
constexpr auto length = 3ULL std::array<int, length> array = {1, 2, 3}; std::for_each(array.begin(), array.end(), [](auto& element) { /* do your operation */ }); for(auto const element: array) { std::cout << element << ", "; } std::cout << std::endl;
Anonymous
What?
Sorry, wrong replay.
Talula
Sorry, wrong replay.
Do you see his output numbers don't match input numbers?
Anonymous
Yes I know
Talula
Yes I know
He is asking for logic behind it... you're giving him how to print an array.
Anonymous
You have to write two programs to transform input array into output array. Part 1 Input Array :  2,4,8,5,12,15,6,10,7,30,25,43,46,45,21 Output Array :  2,4,8, 12, 6, 7, 43,46,21, 5,15,10,30,25,45  
Well if you want a really manual method you could use the fact that you can access the numbers like for example....... int num[] = { 2 , 3 , 4 , 5 }
Anonymous
I have don't understand this program
Anonymous
Do you see his output numbers don't match input numbers?
And the /* ... */ section is exactly for that.
Anonymous
Sorry
Anonymous
It's my mistake
Anonymous
Well if you want a really manual method you could use the fact that you can access the numbers like for example....... int num[] = { 2 , 3 , 4 , 5 }
#include <iostream> using namespace std ; int main() { int num[] = { 2 , 3 , 4 , 5 } ; num[3]; num[3] = 8; cout << num[3] << endl ; return 0; }
Talula
And the /* ... */ section is exactly for that.
Yeah and he doesn't know the logic how these numbers converted.
Anonymous
Mateo
Hey guys do I need to finish oop concepts of C++ to learn how to use unreal engine?
For unreal in particular I would recommend you to do stuff with blueprints only first to learn how unreal classes relate to each other. Once you feel comfortable with blueprints, start to migrate blueprint classes to c++ classes one by one. You will learn quite a bit of the necessary c++ in the process and most of your blueprints knowledge will translate in some way to c++
Mateo
Also note, for using unreal I would say it is a *must* to understand how blueprints work, so you will not be wasting time at all
Anonymous
I thought it might be related
Mateo
Blueprints? I'm about to learn oop and my courses tell me about unreal engine a lot
I dont know your particular curriculum, but blueprints are the visual/scripting language used in unreal. Entire games can be (and some are) shipped without using c++ and only blueprints, but of course c++ is a lot more performant
Mateo
My recommendations comes from someone who uses unreal for games, if you want to do other things you may need a different approach
Mateo
Yep, but completely visual with nodes
Mateo
It is that way because artists and game designers need to program unreal as well
Anonymous
Yep, but completely visual with nodes
Well I'm not sure what visual or nodes are but I guess I'll get to that
Mateo
Exactly
Anonymous
Exactly
So someone with no C++ knowledge could just use blueprints. Okay but does it improve overall performance of my code if I use blueprints along with C++?
Mateo
So someone with no C++ knowledge could just use blueprints. Okay but does it improve overall performance of my code if I use blueprints along with C++?
Yes. You could do your game entirely in blueprints, or entirely in cpp. Cpp being more performant but more tedious in many ways. Each has its pros and cons. In practice what happens is that the base systems that the game relies on are implemented in c++ and gameplay programmers, game designers, tech artists, animators, etc inherit the base c++ classes with blueprint classes to extend functionality
Anonymous
Thanks for the info
Anonymous
Quite more valuable than you think. All that most people talk about unreal engine is if it is better than unity and stuff
Mateo
Quite more valuable than you think. All that most people talk about unreal engine is if it is better than unity and stuff
It's different, not better. You should choose an engine based on your particular needs
Mateo
So thanks
You're welcome
Gaurav
C++ book recommendation for beginner
[Gaal wase bilaa cashuur ]?_ 2 grals
💋❤️
Gaurav
/get cbook
Gaurav
Read the rules
i'm not asking for best book. can anyone suggest a C++ book for beginner
Anonymous
i'm not asking for best book. can anyone suggest a C++ book for beginner
First i suggest to read A Tour Of C++: https://www.stroustrup.com/tour2.html to see what is going on in C++ and then read The C++ Programming Language: https://www.stroustrup.com/4th.html
Gaurav
First i suggest to read A Tour Of C++: https://www.stroustrup.com/tour2.html to see what is going on in C++ and then read The C++ Programming Language: https://www.stroustrup.com/4th.html
i'm learning c++ but i'm not able to understand some fundamentals like bit manipulation. can you suggest a book for c++ fundamentals
Anonymous
Any one know this answer
Anonymous
You have to write two programs to transform input array into output array. Part 1 Input Array :  2,4,8,5,12,15,6,10,7,30,25,43,46,45,21 Output Array :  2,4,8, 12, 6, 7, 43,46,21, 5,15,10,30,25,45   Part 2 Input Array :  2,4,8,5,12,15,6,10,7,30,25,43,46,45,21 Output Array :  2,4,8,21,12,46,6,43 ,7,30,25,10,15,45,5 IMPORTANT: Do not use duplicate or extra array, your program will be rejected if you use extra array. Output should be same array not print statement. Please note pattern of output.
Ritu Raj
what is happening in this array int a[10]={1,2,3,[8]=5,4}; ?
Ritu Raj
After printing all values, it is printing 1230000054
Ritu Raj
Is it [8] = a[5]? Then how?
Anonymous
Is it [8] = a[5]? Then how?
It's GNU compiler extension: https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
Anonymous
Thank u😇
👍🏻🌺
Anonymous
Anonymous
Anonymous
Lol [0...9]
That is cool and really useful, GNU has useful extensions.
Anonymous
That is cool and really useful, GNU has useful extensions.
I prefer using language without extension
Anonymous
I prefer using language without extension
Me too, i really want to those things become part of standard.
Tushar Goel
#include <iostream> using namespace std; int main() { int a=1025; int *p=&a; char *po; po=(char*)p; cout<<p<<po<<*po; // Now firstly I printed 'p' which gives "adress of a" //And after that when I tried printinf "po" and "*po" the compiler does not print anything in c++, but in c it will work. Why so? }
Tushar Goel
Please tell