About for each: Just intelesence) Things about by value/reference I have made clear in discord) Anyway your explanation as always makemethinkabout) Thx srsly.
About remove_erase_if(): Just my vision of implementing that function while I was writing it.
Search found 27 matches
- November 3rd, 2017, 7:44 pm
- Forum: Everything
- Topic: I15 << operator. and hw 16 questions.
- Replies: 11
- Views: 4093
- November 3rd, 2017, 4:57 pm
- Forum: Everything
- Topic: I15 << operator. and hw 16 questions.
- Replies: 11
- Views: 4093
Re: I15 << operator. and hw 16 questions.
My soul is free now...
Oh, hello there. I will stay behind, to gaze at the sun. The sun is a wondrous body. Like a magnificent father! If only I could be so grossly incandescent!
Oh, hello there. I will stay behind, to gaze at the sun. The sun is a wondrous body. Like a magnificent father! If only I could be so grossly incandescent!
- November 3rd, 2017, 4:53 pm
- Forum: Everything
- Topic: I15 << operator. and hw 16 questions.
- Replies: 11
- Views: 4093
Re: I15 << operator. and hw 16 questions.
3d one. Can't even imagine how did you do that without searches... (didn't watch the video): // code goes here for each (int num in numpies) { auto temp = std::find_if(numbers.begin(), numbers.end(), [num](const Pube pube) { return num == pube.num; } ); if (temp != numbers.end()) { std::cout << temp...
- November 3rd, 2017, 3:09 pm
- Forum: Everything
- Topic: I15 << operator. and hw 16 questions.
- Replies: 11
- Views: 4093
Re: I15 << operator & HW I16 questions.
kk. i will write my solutions here provide I'll find them 2nd : First of all I copy from stackoverflow 2 additional functions for breaking entire string into tokens for dealing with them further: https://stackoverflow.com/questions/236129/the-most-elegant-way-to-iterate-the-words-of-a-string Answer ...
- November 2nd, 2017, 9:06 am
- Forum: Everything
- Topic: I15 << operator. and hw 16 questions.
- Replies: 11
- Views: 4093
Re: I15 << operator. and hw 16 questions.
albinopapa, nice, saw that way to overload operator but ignored)
Chili, it's not unfair, it's just not trivial and your restrictions like ONE-STATEMENT SOLUTION || DON'T USE THAT OP FUNCTION IN ALGORITHMS have been fucking me since i saw them.
Chili, it's not unfair, it's just not trivial and your restrictions like ONE-STATEMENT SOLUTION || DON'T USE THAT OP FUNCTION IN ALGORITHMS have been fucking me since i saw them.
- November 1st, 2017, 6:18 pm
- Forum: Everything
- Topic: I15 << operator. and hw 16 questions.
- Replies: 11
- Views: 4093
I15 << operator. and hw 16 questions.
Greatings traveler! How do we manage "<< operator" in HW for I15 in foreach loop? This is because in our Stack class we implement Iterator class? Because I had stucked with error "operand types are : std::ostream << Stack::Element" when I implemented first task kind of. And I still have it even if I...
- August 5th, 2017, 3:05 pm
- Forum: Everything
- Topic: Array of pointers VS pointer to an array (memesweeper game)
- Replies: 11
- Views: 3826
Re: Array of pointers VS pointer to an array (memesweeper ga
I made mistake in previous message, but u're still owning me and u've made answer on that too, dude) Thx a lot.
About RL: in steam machine i have another name)
About RL: in steam machine i have another name)
- August 4th, 2017, 11:38 pm
- Forum: Everything
- Topic: Array of pointers VS pointer to an array (memesweeper game)
- Replies: 11
- Views: 3826
Re: Array of pointers VS pointer to an array (memesweeper ga
Almost correct.
But now It's exist in heap, not in stack? Or...
I mean
but in both situations we use dot operator for useing the members?
Code: Select all
MyClass* ponterToAnArray = new MyClass[5];
I mean
Code: Select all
MyClass* ponterToAnArray = new MyClass[5]; // heap
MyClass ponterToAnArray = new MyClass[5]; // stack
- August 4th, 2017, 8:23 pm
- Forum: Everything
- Topic: Array of pointers VS pointer to an array (memesweeper game)
- Replies: 11
- Views: 3826
Re: Array of pointers VS pointer to an array (memesweeper ga
Exhaustive answer! :o :o :o class MyClass { public: int GetTrue() { return 42; } private: }; void main() { MyClass* pointer = new MyClass(); MyClass* ponterToAnArray = new MyClass[5]; MyClass* arrayOfPointers[5]; for (int i = 0; i < 5; i++) { arrayOfPointers[i] = new MyClass(); } pointer->GetTrue();...
- August 4th, 2017, 6:55 am
- Forum: Everything
- Topic: Array of pointers VS pointer to an array (memesweeper game)
- Replies: 11
- Views: 3826
Re: Array of pointers VS pointer to an array (memesweeper ga
Ok man, It's clear. But what if MemeField allocated dynamicly too? I mean the only way to allocate array with not fixed size it's: ? Tile* pTile = new Tile[some not constant value which calculated in runtime]; Because I don't have the field in stack, it's exist in heap so I don't see restrictions to...