Andrea
Pls send me code
Why should we help you cheat and maybe end up with you as a coworker? it's a lose/lose for us
I_Interface
but we can access a[i][j] right?
Just draw it, your first column - it's array of arrays (pointers for their own arrays)
Sai Meghana
I_Interface
Ye, something like that
Anonymous
Ok then leavr
Francisco
Ok then leavr
No one cares
Anonymous
U do u re work
Oleksandr
🌚angry people... in our russian chats we help with such things
klimi
Oh
klimi
Comrade
Sai Meghana
Program terminated with signal SIGSEGV
Francisco
🌚angry people... in our russian chats we help with such things
Okay, help that person then. I'm not gonna waste my time
Oleksandr
Okay, help that person then. I'm not gonna waste my time
such wasting time helps to improve coding skills, actually)
Andrea
🌚angry people... in our russian chats we help with such things
no one is angry. I think is stupid to let lazy people pass exams, but it's you time use it as you please
Francisco
such wasting time helps to improve coding skills, actually)
I'm here to help with specific things related to C/C++, not for doing someone's homework. To improve my coding skills I just work on personal projects
Vladimir
U do u re work
You should just say how much $$$ you can spend
Francisco
And that's by far the best way to improve your skills
Oleksandr
I'm here to help with specific things related to C/C++, not for doing someone's homework. To improve my coding skills I just work on personal projects
here u have exersice for a 5-10 minutes, and can see solution from other people, compare it (speed, time, complexety) that is not the same as "personal project"
Sai Meghana
waits for this debate to be over
Oleksandr
that's some kind of competition may by, or smth like that
Dima
here u have exersice for a 5-10 minutes, and can see solution from other people, compare it (speed, time, complexety) that is not the same as "personal project"
Because they probably want it for a knowledge, while these, mostly Indians want to become hackers or just pass their exams
klimi
This is jok3 right
Oleksandr
How to become hacker?
reverse c-style string
klimi
Francisco
here u have exersice for a 5-10 minutes, and can see solution from other people, compare it (speed, time, complexety) that is not the same as "personal project"
Not going to argue any further. From my personal experience, projects let you learn way more than single exercises
Vladimir
This is jok3 right
Yea, this is a joke.
Oleksandr
Not going to argue any further. From my personal experience, projects let you learn way more than single exercises
if your projects SO AMAZING, that can cover all C++ features, then.. just good luck)))
Anonymous
Ban hammer's true form
Dima
Useless discussion. We don’t care 🤷‍♀️ #ot or warn
Dima
#ot
Dima
It’s much nicer when someone asks about certain things, not like “give me all the code»
Anonymous
Pls send me code
Your attitude is OK, maybe you don't like programming, but have to learn it within a certain course only to forget later on. One maybe could give you the code, if you were to specify your assumed pricing.
Sai Meghana
int **array = new int*[n]; for(i=0;i<n;i++) { cin>>ele; //number of elements in each row for(int j=0;j<ele;j++) { cin>>array[i][j]; } }
Sai Meghana
I think im missing something important .-.
Dima
You need to alloc secondary arrays
Dima
You allocated a storage for them, but not arrays itself
Oleksandr
I think im missing something important .-.
after all this shit... how are u goin to find arrays lengths?
Sai Meghana
the length is given
Sai Meghana
its a weird question
Oleksandr
u init it, okay... and so what? after that i want to use this 2d array
Anonymous
I think im missing something important .-.
Arrays decay into pointers, but pointers aren't arrays. To put it the simpliest way possible. You should learn to use Stack Overflow, hence this question has been addressed countless times.
Oleksandr
where i can find size?
Sai Meghana
i mean the problem im trying to solve is a weird question, not yours 🙈
Oleksandr
it was forgotten after for-loop iteration
Sai Meghana
u init it, okay... and so what? after that i want to use this 2d array
we have to find a particular element, given the indices.. thats all they asked for
Sai Meghana
I had blindly assumed that the int **array declaration would take care of that! (facepalm)
Oleksandr
i think in english i can only give the solution, not explanation))
Oleksandr
🌚sad
Sai Meghana
I got it, its okay. I wondered why I hadn't used 'ele' while allocating anywhere but wasn't sure how to ask XD
Sai Meghana
Thank you :)
Sai Meghana
it works
Sai Meghana
I can use this for strings as well, right?
Sai Meghana
char instead of int.. oh right, there's no string data type in C, thats what we used to do
Oleksandr
u allocate "mamory block", that don't know nothing about the type, just allocate right size, and cast to right type))
Oleksandr
so, for string it works too
Sai Meghana
And what about the vector function? Can that be used too?
Sai Meghana
The one I just sent was in c++
Sai Meghana
😳
Anonymous
@saime9hana You should learn to use: 1. Google -> StackOverflow 2. The official documentation These usually have all the answers for such questions. The ability to use these is crucial in the IT industry, regardless, whether you're going to be a programmer or not.
Sai Meghana
The one I just sent was in c++
but in college we always used C
Oleksandr
The one I just sent was in c++
std::string in C++ is just a structure with char *str; inside
Oleksandr
okay, there is size_t size; and size_t capacity too, but don't care
Oleksandr
I think it's a class
u are right.. but that doesn't matter
Vladimir
okay, there is size_t size; and size_t capacity too, but don't care
When I impemented my string type, I just create struct with fields 'char *s', 'size_t alloc', 'size_t len'. Creating string mean allocate with bigger value than len. And function 'insert' which automatically checks if string need to be reallocated and insert part of text inside. Convenient. Don't know how it is implemented in c++