Anonymous
alguien sabe de sql
Anonymous
warning!! english please
Anonymous
Need hepl
Anonymous
Help
Anonymous
Sql server
olli
Sql server
this is hardly the right group for it, unless it's C++ related.
Labsin
Tianwen 1 arrived near Mars in February 2021 to carry out Mars capture. In May 2021, the landing vehicle and orbiter separated, soft landing on the surface of Mars, The rover left the landing platform to carry out patrol and exploration work on the surface of Mars, soil properties, material composition, water ice, atmosphere, ionosphere, magnetic field and other scientific exploration, realizing China's technological leap in the field of deep space exploration. Deep space exploration will promote the all-round development of space science, space technology and space applications and make greater contributions to serving the overall interests of national development and enhancing human welfare. Before this, China has launched several man-made satellites into space, and there are n (1 < = n < = 5) man-made satellites, Each satellite has three attributes: manufacturing year, satellite number, satellite load (all attributes are integer values of int type), The number of satellites whose output load is less than the average load of n satellites is now required (the mean load can be divided by integer instead of using floating point numbers). Note: No legality check is required for input data, assuming all inputs are in compliance. Follow the following function prototype to write the program. struct sate {     int year;     int id;     int load; }; / / Define struct sate, which includes year of manufacture, satellite id, satellite load. int input (struct sate Sate[], int n); / / Enter the number of satellites n separately from the keyboard, and the different properties of each satellite. The return value is the number n of satellites. int solve (struct sate Sate[], int n); / / Based on input satellite attributes, returns the number of satellites with lower than average payload ans. Input format: the first behavior number n, line 2 ~ n + 1 are input three numbers, respectively for the first ~ n satellite manufacturing year, satellite number id, satellite load. Input format: Output includes only one line for number of satellites ans. Run example: 3 1984 334 40000 2012 531 20000 2021 341 60000 1
Mehmet Akif
I need help for C
Tharindu
Can anyone give me the sample question of C++ and example code accordantly the question?
数学の恋人
Guys/Gals a doubt, I have a class like class MEM { private: std::array<std::uint8_t, MAX_MEM> memData; // MAX_MEM is a const unsigned short public: MEM(); }; so the question is, how do I initialize the memData from the constructor (like memData[i] = 0 and 0 <= i < MAX_MEM), actually I plan to use constructor whenever I want to reset values of the object so basically I'll be doing something like MEM mem; mem.Reset(); // this will call constructor and reset all values if there's any other better way to do so, something like using copy constructor to assign a newly constructed object to already existing object and then destroying new one. So please do tell
Mar!o
so no need to call constructor in my reset function, right?
of course you can also call fill in your constructor
数学の恋人
of course you can also call fill in your constructor
yep doing this, thanks for the idea
Mehmet Akif
Write a MAIN function and a FUNCTION which will print out the sum of each column of array A to the standard output. Within the MAIN function: . Initialize a two-dimensional 5X6 integer array A from the standart input. Pass the array A to the FUNCTION as an argument. Within the FUNCTION: . Read array A and compute and print out the sum of each column of array A to the standard output.
Mehmet Akif
what are you stuck on?
Creating a 5x6 array
Anonymous
Creating a 5x6 array
put the code on https://wandbox.org/ or https://godbolt.org/ and share the link
数学の恋人
syazwanie suhaini
does anyone know octave apps
Anonymous
instead of calling the constructor, make the constructor call reset().
https://stackoverflow.com/questions/2166099/calling-a-constructor-to-re-initialize-object
数学の恋人
https://stackoverflow.com/questions/2166099/calling-a-constructor-to-re-initialize-object
oh this is doing similar to what I already was doing, but I was doing something like void MEM::Reset(MEM &mem) { mem = *new MEM; }
数学の恋人
It will definitely leak
yes I knew it, thanks for confirming
Anonymous
oh this is doing similar to what I already was doing, but I was doing something like void MEM::Reset(MEM &mem) { mem = *new MEM; }
1) this does leak memory 2) i sent that to tell you that it's a terrible practice to call the constructor for re-initialisation
Vlad
Also void foo(Mem*& ptr_ref)
Pavel
Also void foo(Mem*& ptr_ref)
I think this is not the desired logic
Pavel
I mean from what I've read the task
Vlad
I mean from what I've read the task
I'm too lazy to do it :P
Anonymous
mem = MEM();
that might still be dangerous because Reset() isn't static a.reset(a);
Pavel
that might still be dangerous because Reset() isn't static a.reset(a);
I think it shouldn't be an issue in any case 🤔 This code just calls default constructor and assignment operator
Pavel
So it doesn't depend on other data from the outside
数学の恋人
Thanks guys , it's working perfectly fine now
Ameemo
DO U GUYS SOLVE DATA STRUCSHER ?
数学の恋人
DO U GUYS SOLVE DATA STRUCSHER ?
What is that even supposed to mean?
数学の恋人
o.o
oh hey klimi
klimi
o/ #ot
Ameemo
Using an array of size 5, we want to implement a queue using circular arrays. What will be the contents of the array after executing below operations? Why do we use circular array queue implementation? enqueue(1) enqueue(5) dequeue() enqueue(7) dequeue() enqueue(2) enqueue(4) dequeue() enqueue(6)
数学の恋人
nah nothing, just saying hi
Ameemo
hhhhh thanks any way guys
Ehsan
No
Ehsan
don’t solve for him lmao
Vlad
??
If we'd give you fish, you'll never know how to do fishing if you catch my allegory
ninja
Anonymous
why are you doing fishing
Probably these guys are students who wants to do they homeworks. I don't think they want to learn coding, They just want the answer to pass the exam :) by grumbling we don't help them...
Cris
just use your reset and do std::fill(std::begin(memData), std::end(memData), 0); but you could just use std::array directly or write an alias with your custom MAX_MEM
I think this is the best solution, there is an alternative if you really want to have all the data initialized before the ctor body: MEM() : memData({4,5,6,7,8}) { } // assuming you have MAX_MEM == 5
Ehsan
Grades won’t help you if you get a job 😂
Anonymous
So true
Anonymous
What if i don't want to learn fishing
you'll have to pay for it then..
Ehsan
This group is not worse than the arab one. They all just cheat and people help them 🤦‍♂️
AB💞
🤣
Cris
What if i don't want to learn fishing
then I think is a pity as if I understood correctly, in this channel is all about the fishing technique while not giving away any fish :)
shuzuya
Anonymous
Hi guys. I'm a fifteen year old Ghanaian kid and i love coding. I want to learn all there is to learn about C and C++